Skip to content

Commit db692b2

Browse files
authored
Merge pull request #862 from asottile/compare-types-singletons
compare types as singletons
2 parents 3529f3a + d1860c1 commit db692b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyupgrade/_plugins/legacy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _targets_same(target: ast.AST, yield_value: ast.AST) -> bool:
6464
# ignore `ast.Load` / `ast.Store`
6565
if _all_isinstance((t1, t2), ast.expr_context):
6666
continue
67-
elif type(t1) != type(t2):
67+
elif type(t1) is not type(t2):
6868
return False
6969
elif not _fields_same(t1, t2):
7070
return False

0 commit comments

Comments
 (0)