Skip to content

Commit

Permalink
Apply ruff/pycodestyle rule E721 (#347)
Browse files Browse the repository at this point in the history
E721 Do not compare types, use `isinstance()`
  • Loading branch information
DimitriPapadopoulos authored and martinblech committed Oct 8, 2024
1 parent 66bd6a8 commit 71b55aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xmltodict.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def _emit(key, value, content_handler,
attrs[ik[len(attr_prefix):]] = iv
continue
children.append((ik, iv))
if type(indent) is int:
if isinstance(indent, int):
indent = ' ' * indent
if pretty:
content_handler.ignorableWhitespace(depth * indent)
Expand Down

0 comments on commit 71b55aa

Please sign in to comment.