Skip to content

Commit fb8bccb

Browse files
author
Ted
committed
int, not dict for type check on mav keys
1 parent 5b4979e commit fb8bccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mplfinance/_arg_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ def _mav_validator(mav_value):
114114
return False
115115

116116
if isinstance(mav_value,dict):
117-
if 'period' not in mav_value or not isinstance(mav_value['period'],(tuple,list,dict)):
117+
if 'period' not in mav_value or not isinstance(mav_value['period'],(tuple,list,int)):
118118
return False
119119
if 'shift' in mav_value:
120-
if not isinstance(mav_value['shift'],(tuple,list,dict)):
120+
if not isinstance(mav_value['shift'],(tuple,list,int)):
121121
return False
122122
if isinstance(mav_value['period'], int) and isinstance(mav_value['shift'], int):
123123
return True

0 commit comments

Comments
 (0)