Skip to content

Commit 538d364

Browse files
authored
stubtest: allow memberexpr for overloads (#9507)
Ensuring nodes.NameExpr turned out to be a little too defensive Fixes #9506
1 parent 89695cd commit 538d364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/stubtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ def _resolve_funcitem_from_decorator(dec: nodes.OverloadPart) -> Optional[nodes.
784784
def apply_decorator_to_funcitem(
785785
decorator: nodes.Expression, func: nodes.FuncItem
786786
) -> Optional[nodes.FuncItem]:
787-
if not isinstance(decorator, nodes.NameExpr):
787+
if not isinstance(decorator, nodes.RefExpr):
788788
return None
789789
if decorator.fullname is None:
790790
# Happens with namedtuple

0 commit comments

Comments
 (0)