Skip to content

Commit

Permalink
Merge pull request #862 from asottile/compare-types-singletons
Browse files Browse the repository at this point in the history
compare types as singletons
  • Loading branch information
asottile committed Jul 15, 2023
2 parents 3529f3a + d1860c1 commit db692b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyupgrade/_plugins/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _targets_same(target: ast.AST, yield_value: ast.AST) -> bool:
# ignore `ast.Load` / `ast.Store`
if _all_isinstance((t1, t2), ast.expr_context):
continue
elif type(t1) != type(t2):
elif type(t1) is not type(t2):
return False
elif not _fields_same(t1, t2):
return False
Expand Down

0 comments on commit db692b2

Please sign in to comment.