Skip to content

Commit

Permalink
stubtest: allow memberexpr for overloads (#9507)
Browse files Browse the repository at this point in the history
Ensuring nodes.NameExpr turned out to be a little too defensive

Fixes #9506
  • Loading branch information
hauntsaninja committed Sep 30, 2020
1 parent 89695cd commit 538d364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def _resolve_funcitem_from_decorator(dec: nodes.OverloadPart) -> Optional[nodes.
def apply_decorator_to_funcitem(
decorator: nodes.Expression, func: nodes.FuncItem
) -> Optional[nodes.FuncItem]:
if not isinstance(decorator, nodes.NameExpr):
if not isinstance(decorator, nodes.RefExpr):
return None
if decorator.fullname is None:
# Happens with namedtuple
Expand Down

0 comments on commit 538d364

Please sign in to comment.