Skip to content

Commit

Permalink
compare types as singletons
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jul 15, 2023
1 parent 3529f3a commit d1860c1
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 d1860c1

Please sign in to comment.