Skip to content

Commit

Permalink
Use 'isinstance' to avoid PEP error
Browse files Browse the repository at this point in the history
  • Loading branch information
bwendling committed Sep 22, 2023
1 parent 4cd6682 commit d828a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/yapf_third_party/_ylib2to3/pytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def type_repr(type_num):
# printing tokens is possible but not as useful
# from .pgen2 import token // token.__dict__.items():
for name, val in python_symbols.__dict__.items():
if type(val) == int:
if isinstance(val, int):
_type_reprs[val] = name
return _type_reprs.setdefault(type_num, type_num)

Expand Down

0 comments on commit d828a15

Please sign in to comment.