Skip to content

Commit

Permalink
removed some code
Browse files Browse the repository at this point in the history
  • Loading branch information
GulnazSerikbay committed Dec 6, 2023
1 parent 69aec40 commit 046370e
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5835,21 +5835,7 @@ def has_no_custom_eq_checks(t: Type) -> bool:
# Set if_map for the entire tuple
if_map = {}
else_map = None
else:
new_items = []
if len(right_expr.items) != 0:
# extract the enum type in the context
enum_type = get_proper_type(
self.lookup_type_or_none(right_expr.items[0].expr)
).fallback
for name, symbol in enum_type.type.names.items():
if not isinstance(symbol.node, Var):
continue
# Skip these since Enum will remove it
if name in ENUM_REMOVED_PROPS:
continue
new_items.append(LiteralType(name, enum_type))


else:
if left_index in narrowable_operand_index_to_hash:
# We only try and narrow away 'None' for now
Expand Down

0 comments on commit 046370e

Please sign in to comment.