Fixed missing second-to-last entry in representation list. Polished help texts.

This commit is contained in:
Philip Eisenlohr 2021-02-26 03:20:28 +01:00
parent 9436edbd85
commit 1d62341811
1 changed files with 23 additions and 23 deletions

View File

@ -105,7 +105,7 @@ class Result:
self.view('increments',visible_increments) self.view('increments',visible_increments)
in_between = '' if len(visible_increments) < 3 else \ in_between = '' if len(visible_increments) < 3 else \
''.join([f'\n{inc}\n ...\n' for inc in visible_increments[1:-2]]) ''.join([f'\n{inc}\n ...\n' for inc in visible_increments[1:-1]])
return util.srepr(first + in_between + last) return util.srepr(first + in_between + last)
@ -119,10 +119,10 @@ class Result:
action : str action : str
Select from 'set', 'add', and 'del'. Select from 'set', 'add', and 'del'.
what : str what : str
Attribute to change (must be in self.visible). Attribute to change (must be from self.visible).
datasets : list of str or bool datasets : list of str 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 [].
""" """
def natural_sort(key): def natural_sort(key):
@ -200,7 +200,7 @@ class Result:
self._allow_modification = True self._allow_modification = True
def disallow_modification(self): def disallow_modification(self):
"""Disllow to overwrite existing data (default case).""" """Disallow to overwrite existing data (default case)."""
self._allow_modification = False self._allow_modification = False
@ -272,10 +272,10 @@ class Result:
Parameters Parameters
---------- ----------
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 : list of str 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 [].
""" """
self._manage_view('set',what,datasets) self._manage_view('set',what,datasets)
@ -288,10 +288,10 @@ class Result:
Parameters Parameters
---------- ----------
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 : list of str 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 [].
""" """
self._manage_view('add',what,datasets) self._manage_view('add',what,datasets)
@ -304,10 +304,10 @@ class Result:
Parameters Parameters
---------- ----------
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 : list of str 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 [].
""" """
self._manage_view('del',what,datasets) self._manage_view('del',what,datasets)
@ -315,14 +315,14 @@ class Result:
def rename(self,name_old,name_new): def rename(self,name_old,name_new):
""" """
Rename datasets. Rename dataset.
Parameters Parameters
---------- ----------
name_old : str name_old : str
name of the datasets to be renamed Name of the dataset to be renamed.
name_new : str name_new : str
new name of the datasets New name of the dataset.
""" """
if self._allow_modification: if self._allow_modification:
@ -353,13 +353,13 @@ class Result:
---------- ----------
datasets : iterable or str datasets : iterable or str
constituent : int constituent : int
Constituent to consider for phase data Constituent to consider for phase data.
tagged : bool tagged : bool
tag Table.column name with '#constituent' Tag Table.column name with '#constituent'.
defaults to False Defaults to False.
split : bool split : bool
split Table by increment and return dictionary of Tables Split Table by increment and return dictionary of Tables.
defaults to True Defaults to True.
""" """
sets = datasets if hasattr(datasets,'__iter__') and not isinstance(datasets,str) else \ sets = datasets if hasattr(datasets,'__iter__') and not isinstance(datasets,str) else \
@ -415,7 +415,7 @@ class Result:
are considered as they contain user-relevant data. are considered as they contain user-relevant data.
Single strings will be treated as list with one entry. Single strings will be treated as list with one entry.
Wild card matching is allowed, but the number of arguments need to fit. Wild card matching is allowed, but the number of arguments needs to fit.
Parameters Parameters
---------- ----------