Skip to content

Commit d22a8cc

Browse files
fix docstring;remove extra isinstance (my bad)
1 parent 2aae88b commit d22a8cc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mplfinance/_arg_validators.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,13 @@ def _mav_validator(mav_value):
107107
Value for mav (moving average) keyword may be:
108108
scalar int greater than 1, or tuple of ints, or list of ints (each greater than 1)
109109
or a dict of `period` and `shift` each of which may be:
110-
scalar int, or tuple of ints, or list of ints. `period` must be greater than 1
111-
while `shift` must be greater than 0.
110+
scalar int, or tuple of ints, or list of ints: each `period` int must be greater than 1
112111
'''
113112
def _valid_mav(value, is_period=True):
114113
if not isinstance(value,(tuple,list,int)):
115114
return False
116115
if isinstance(value,int):
117-
return isinstance(value,int) and (value >= 2 or not is_period)
116+
return (value >= 2 or not is_period)
118117
# Must be a tuple or list here:
119118
for num in value:
120119
if not isinstance(num,int) or (is_period and num < 2):

0 commit comments

Comments
 (0)