Skip to content

Commit 88fe21d

Browse files
sixoletgvanrossum
authored andcommitted
Produce correct error when someone has a single overload by MemberExpr (#3294)
1 parent ff5ab81 commit 88fe21d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,7 @@ def visit_decorator(self, e: Decorator) -> None:
22082208
sig = self.function_type(e.func) # type: Type
22092209
# Process decorators from the inside out.
22102210
for d in reversed(e.decorators):
2211-
if isinstance(d, NameExpr) and d.fullname == 'typing.overload':
2211+
if refers_to_fullname(d, 'typing.overload'):
22122212
self.fail('Single overload definition, multiple required', e)
22132213
continue
22142214
dec = self.expr_checker.accept(d)

0 commit comments

Comments
 (0)