Skip to content
Snippets Groups Projects
Commit 5531c346 authored by Pierre LALET's avatar Pierre LALET
Browse files

ls(): do not display "Emph" for Emph fields

parent 3dfad350
No related branches found
No related tags found
No related merge requests found
...@@ -1283,7 +1283,8 @@ def ls(obj=None, case_sensitive=False, verbose=False): ...@@ -1283,7 +1283,8 @@ def ls(obj=None, case_sensitive=False, verbose=False):
attrs = [] attrs = []
long_attrs = [] long_attrs = []
while isinstance(cur_fld, (Emph, ConditionalField)): while isinstance(cur_fld, (Emph, ConditionalField)):
attrs.append(cur_fld.__class__.__name__[:4]) if isinstance(cur_fld, ConditionalField):
attrs.append(cur_fld.__class__.__name__[:4])
cur_fld = cur_fld.fld cur_fld = cur_fld.fld
if verbose and isinstance(cur_fld, EnumField) \ if verbose and isinstance(cur_fld, EnumField) \
and hasattr(cur_fld, "i2s"): and hasattr(cur_fld, "i2s"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment