Avoid union syntax in an isinstance check (#4197)
This is a partial revert of commit 44f4bc86. The UP038 ruff rule
was removed and using union syntax is no longer recommended.
This commit is contained in:
parent
47a4caf163
commit
173c64c847
|
|
@ -100,7 +100,7 @@ class FormattedOutput:
|
|||
if '!' in key:
|
||||
value = '*' * len(value)
|
||||
|
||||
if isinstance(value, int | float) or (isinstance(value, str) and value.isnumeric()):
|
||||
if isinstance(value, (int, float)) or (isinstance(value, str) and value.isnumeric()):
|
||||
obj_data.append(unicode_rjust(str(value), width))
|
||||
else:
|
||||
obj_data.append(unicode_ljust(str(value), width))
|
||||
|
|
|
|||
Loading…
Reference in New Issue