From d828a159f5a0409168f8c5194748019ed6b7d2b1 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 21 Sep 2023 17:22:13 -0700 Subject: [PATCH] Use 'isinstance' to avoid PEP error --- third_party/yapf_third_party/_ylib2to3/pytree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/yapf_third_party/_ylib2to3/pytree.py b/third_party/yapf_third_party/_ylib2to3/pytree.py index 0fcdf4b2c..ea9767be9 100644 --- a/third_party/yapf_third_party/_ylib2to3/pytree.py +++ b/third_party/yapf_third_party/_ylib2to3/pytree.py @@ -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)