Skip to content

Commit db6cd3d

Browse files
marketneutraltwiecki
authored andcommitted
STY: fix errors raised byt flake8
1 parent 056ab17 commit db6cd3d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pyfolio/pos.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
try:
2222
from zipline.assets import Equity, Future
2323
ZIPLINE = True
24-
except:
24+
except ImportError as error:
2525
ZIPLINE = False
26-
warnings.warn('Module "zipline.assets" not found; mutltipliers will not be applied to position notionals.')
26+
warnings.warn(
27+
'Module "zipline.assets" not found; mutltipliers will not be applied' +
28+
'to position notionals.'
29+
)
2730

2831

2932
def get_percent_alloc(values):
@@ -144,7 +147,7 @@ def extract_pos(positions, cash):
144147
for asset in values.columns:
145148
if type(asset) in [Equity, Future]:
146149
values[asset] = values[asset] * asset.price_multiplier
147-
150+
148151
values = values.join(cash).fillna(0)
149152

150153
# NOTE: Set name of DataFrame.columns to sid, to match the behavior

0 commit comments

Comments
 (0)