Skip to content

Commit 95a0bc1

Browse files
authored
Removed if (plottype not in _valid_types_all) ...
This is unnecessary because the kwarg validator already check whether `kwarg['type']` is in `_valid_types_all`. So if the value passed the validator then it must be in `_valid_types_all`. So we don't need to check again in function `_get_valid_plot_types` (unless...this function is used also by function other than `plotting.plot`)
1 parent 2838c49 commit 95a0bc1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/mplfinance/_arg_validators.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,9 @@ def _get_valid_plot_types(plottype=None):
9393

9494
if plottype is None:
9595
return _valid_types_all
96-
97-
if plottype not in _valid_types_all:
98-
return None
9996
elif plottype in _alias_types:
10097
return _alias_types[plottype]
101-
else:
102-
return plottype
98+
return plottype
10399

104100

105101
def _mav_validator(mav_value):

0 commit comments

Comments
 (0)