Skip to content

Commit a17a313

Browse files
committed
Missing get_proper_type
1 parent 25d10b1 commit a17a313

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mypy/checker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,10 +2215,6 @@ def check_method_override_for_base_with_name(
22152215
# Will always fail to typecheck below, since we know the node is a method
22162216
original_type = NoneType()
22172217

2218-
if name == "__hash__" and isinstance(original_type, NoneType):
2219-
# Allow defining `__hash__` even if parent class was explicitly made unhashable
2220-
return False
2221-
22222218
always_allow_covariant = False
22232219
if is_settable_property(defn) and (
22242220
is_settable_property(original_node) or isinstance(original_node, Var)
@@ -2242,6 +2238,10 @@ def check_method_override_for_base_with_name(
22422238
typ = get_proper_type(typ)
22432239
original_type = get_proper_type(original_type)
22442240

2241+
if name == "__hash__" and isinstance(original_type, NoneType):
2242+
# Allow defining `__hash__` even if parent class was explicitly made unhashable
2243+
return False
2244+
22452245
if (
22462246
is_property(defn)
22472247
and isinstance(original_node, Var)

0 commit comments

Comments
 (0)