Skip to content

Commit 365da14

Browse files
committed
Fix a minor bug from a previous PR
1 parent 10ca489 commit 365da14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/checkexpr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,7 +2934,7 @@ def infer_overload_return_type(
29342934
if not args_contain_any:
29352935
self.chk.store_types(m)
29362936
if isinstance(infer_type, ProperType) and isinstance(infer_type, CallableType):
2937-
self.chk.check_deprecated(infer_type.definition, context)
2937+
self.chk.warn_deprecated(infer_type.definition, context)
29382938
return ret_type, infer_type
29392939
p_infer_type = get_proper_type(infer_type)
29402940
if isinstance(p_infer_type, CallableType):
@@ -2975,7 +2975,7 @@ def infer_overload_return_type(
29752975
if isinstance(inferred_callable, ProperType) and isinstance(
29762976
inferred_callable, CallableType
29772977
):
2978-
self.chk.check_deprecated(inferred_callable.definition, context)
2978+
self.chk.warn_deprecated(inferred_callable.definition, context)
29792979
return return_types[0], inferred_types[0]
29802980

29812981
def overload_erased_call_targets(

0 commit comments

Comments
 (0)