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:
correctmost 2026-02-01 06:47:39 -05:00 committed by GitHub
parent 47a4caf163
commit 173c64c847
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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))