mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-12 22:13:26 +08:00
7904773d00
The latest flake8 release in now 1.5, which pulls in pep8: 1.3.4a0 The upgrade pep8 has changes to what it picks up as lint. Making code base compatible, so that new devs can install pep8 from PyPI and not have friction over the version difference. Currently using these ignores in the config file: ``` [pep8] ignore = E124,E125,E126 ``` Ignoring these since they are difficult to squash while maintaining an 80 char line length, and appear spurious. Should address later. Updates Travis config, README, and pip requirements to reflect change.
38 lines
1.3 KiB
Python
38 lines
1.3 KiB
Python
from zipline import ndict
|
|
# ---------------------
|
|
# Error Messages.
|
|
# User facing.
|
|
# ---------------------
|
|
|
|
ERRORS = ndict({
|
|
|
|
# Raised if a user script calls the override_slippage magic
|
|
# with a slipage object that isn't a VolumeShareSlippage or
|
|
# FixedSlipapge
|
|
'UNSUPPORTED_SLIPPAGE_MODEL':
|
|
"You attempted to override slippage with an unsupported class. \
|
|
Please use VolumeShareSlippage or FixedSlippage.",
|
|
|
|
# Raised if a users script calls override_slippage magic
|
|
# after the initialize method has returned.
|
|
'OVERRIDE_SLIPPAGE_POST_INIT':
|
|
"You attempted to override slippage after the simulation has \
|
|
started. You may only call override_slippage in your initialize \
|
|
method.",
|
|
|
|
# Raised if a user script calls the override_commission magic
|
|
# with a commission object that isn't a PerShare or
|
|
# PerTrade commission
|
|
'UNSUPPORTED_COMMISSION_MODEL':
|
|
"You attempted to override commission with an unsupported class. \
|
|
Please use PerShare or PerTrade.",
|
|
|
|
# Raised if a users script calls override_commission magic
|
|
# after the initialize method has returned.
|
|
'OVERRIDE_COMMISSION_POST_INIT':
|
|
"You attempted to override commission after the simulation has \
|
|
started. You may only call override_commission in your initialize \
|
|
method.",
|
|
|
|
})
|