mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-23 06:41:32 +03:00
Refactor to one isinstance() call
This commit is contained in:
parent
fab2791fc6
commit
fe443f4c07
@ -282,7 +282,7 @@ class PropertiesTree(Tree[object]):
|
||||
elif isinstance(data, list):
|
||||
length = len(data) # type: ignore
|
||||
node.set_label(Text(f"[] {name} ({length})"))
|
||||
elif isinstance(data, str) or isinstance(data, int) or isinstance(data, float) or isinstance(data, bool) or data is None:
|
||||
elif isinstance(data, (str, int, float, bool, type(None))):
|
||||
node.allow_expand = False
|
||||
if name:
|
||||
label = with_name(PropertiesTree.highlighter(repr(data)))
|
||||
|
Loading…
Reference in New Issue
Block a user