File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed
Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,8 @@ def _reset(var=None):
4141
4242 Parameters
4343 ----------
44- var : str or list, default None
45- If str, it is the name of the configuration variable to reset. If lst,
46- it is a list of configuration variables to reset. If None, then all
44+ var : str, default None
45+ The name of the configuration variable. If None, then all
4746 configuration variables are reset to their default values.
4847
4948 Returns
@@ -55,21 +54,12 @@ def _reset(var=None):
5554 ]
5655
5756 if var is None :
58- var = config_vars
59- elif isinstance (var , str ):
60- var = [var ]
57+ for v in config_vars :
58+ globals ()[v ] = _STUMPY_DEFAULTS [v ]
59+ elif var in config_vars :
60+ globals ()[var ] = _STUMPY_DEFAULTS [var ]
6161 else :
62- pass
63-
64- if not set (var ).issubset (config_vars ):
65- msg = (
66- "Could not reset the following unrecognized configuration variable(s): "
67- + f"{ set (var ) - set (config_vars )} "
68- )
62+ msg = f'Could not reset unrecognized configuration variable "{ var } "'
6963 warnings .warn (msg )
7064
71- # Reset all config variables back to default values
72- for v in var :
73- globals ()[v ] = _STUMPY_DEFAULTS [v ]
74-
7565 return
You can’t perform that action at this time.
0 commit comments