arguments can be int, bool, str
This commit is contained in:
parent
c43dc0cb95
commit
7b846efe4a
|
@ -2,3 +2,4 @@
|
||||||
dist
|
dist
|
||||||
damask.egg-info
|
damask.egg-info
|
||||||
.coverage
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
|
|
@ -125,7 +125,7 @@ class Result:
|
||||||
Select from 'set', 'add', and 'del'.
|
Select from 'set', 'add', and 'del'.
|
||||||
what : str
|
what : str
|
||||||
Attribute to change (must be from self.visible).
|
Attribute to change (must be from self.visible).
|
||||||
datasets : list of str or bool
|
datasets : str, int, list of str, list of int, or bool
|
||||||
Name of datasets as list; supports ? and * wildcards.
|
Name of datasets as list; supports ? and * wildcards.
|
||||||
True is equivalent to [*], False is equivalent to [].
|
True is equivalent to [*], False is equivalent to [].
|
||||||
|
|
||||||
|
@ -139,7 +139,8 @@ class Result:
|
||||||
datasets = ['*']
|
datasets = ['*']
|
||||||
elif datasets is False:
|
elif datasets is False:
|
||||||
datasets = []
|
datasets = []
|
||||||
choice = [datasets] if isinstance(datasets,str) else datasets.copy()
|
choice = list(datasets).copy() if hasattr(datasets,'__iter__') and not isinstance(datasets,str) else \
|
||||||
|
[datasets]
|
||||||
|
|
||||||
inc = 'inc' if self.version_minor < 12 else 'increment_' # compatibility hack
|
inc = 'inc' if self.version_minor < 12 else 'increment_' # compatibility hack
|
||||||
if what == 'increments':
|
if what == 'increments':
|
||||||
|
|
Loading…
Reference in New Issue