mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-29 11:18:20 +08:00
Updates flake8 to latest.
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.
This commit is contained in:
@@ -134,8 +134,8 @@ class TradingAlgorithm(object):
|
||||
"""
|
||||
if isinstance(source, (list, tuple)):
|
||||
assert start is not None and end is not None, \
|
||||
"""When providing a list of sources, \
|
||||
start and end date have to be specified."""
|
||||
"""When providing a list of sources, \
|
||||
start and end date have to be specified."""
|
||||
elif isinstance(source, pd.DataFrame):
|
||||
assert isinstance(source.index, pd.tseries.index.DatetimeIndex)
|
||||
# if DataFrame provided, wrap in DataFrameSource
|
||||
@@ -234,14 +234,14 @@ start and end date have to be specified."""
|
||||
|
||||
def set_slippage(self, slippage):
|
||||
assert isinstance(slippage, (VolumeShareSlippage, FixedSlippage)), \
|
||||
MESSAGES.ERRORS.UNSUPPORTED_SLIPPAGE_MODEL
|
||||
MESSAGES.ERRORS.UNSUPPORTED_SLIPPAGE_MODEL
|
||||
if self.initialized:
|
||||
raise Exception(MESSAGES.ERRORS.OVERRIDE_SLIPPAGE_POST_INIT)
|
||||
self.slippage = slippage
|
||||
|
||||
def set_commission(self, commission):
|
||||
assert isinstance(commission, (PerShare, PerTrade)), \
|
||||
MESSAGES.ERRORS.UNSUPPORTED_COMMISSION_MODEL
|
||||
MESSAGES.ERRORS.UNSUPPORTED_COMMISSION_MODEL
|
||||
|
||||
if self.initialized:
|
||||
raise Exception(MESSAGES.ERRORS.OVERRIDE_COMMISSION_POST_INIT)
|
||||
|
||||
Reference in New Issue
Block a user