fix flake8
parent
38d807e3bf
commit
94aa7cbf71
4
.flake8
4
.flake8
|
@ -1,3 +1,5 @@
|
|||
[flake8]
|
||||
max-line-length = 88
|
||||
max-line-length = 120
|
||||
extend-ignore = E203
|
||||
per-file-ignores =
|
||||
tests/test_imports.py:F401
|
|
@ -591,10 +591,10 @@ def _get_all_args(expression: cp.Expression) -> List[cp.Expression]:
|
|||
return list(_flatten([_get_all_args(arg) for arg in expression.args]))
|
||||
|
||||
|
||||
def _flatten(l: Iterable) -> Iterable:
|
||||
def _flatten(alist: Iterable) -> Iterable:
|
||||
# Helper method to flatten an iterable
|
||||
for el in l:
|
||||
if isinstance(el, Iterable) and not isinstance(el, (str, bytes)):
|
||||
yield from _flatten(el)
|
||||
for v in alist:
|
||||
if isinstance(v, Iterable) and not isinstance(v, (str, bytes)):
|
||||
yield from _flatten(v)
|
||||
else:
|
||||
yield el
|
||||
yield v
|
||||
|
|
|
@ -222,7 +222,7 @@ class CLA(base_optimizer.BaseOptimizer):
|
|||
if (
|
||||
self.w[i][j] - self.lB[j] < -tol
|
||||
or self.w[i][j] - self.uB[j] > tol
|
||||
): # pragma: no cover
|
||||
): # pragma: no cover
|
||||
flag = True
|
||||
break
|
||||
if flag is True:
|
||||
|
|
|
@ -8,7 +8,6 @@ Currently implemented:
|
|||
- ``plot_efficient_frontier`` – plot the efficient frontier from an EfficientFrontier or CLA object
|
||||
- ``plot_weights`` - bar chart of weights
|
||||
"""
|
||||
import copy
|
||||
import warnings
|
||||
|
||||
import numpy as np
|
||||
|
|
Loading…
Reference in New Issue