Skip to content

Commit

Permalink
Mention fullname of PlaceholderNode in assertion (#10565)
Browse files Browse the repository at this point in the history
Helps with #10542

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: hauntsaninja <>
  • Loading branch information
TheCleric and hauntsaninja committed May 31, 2021
1 parent 0635422 commit 4da09c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mypy/nodes.py
Expand Up @@ -3080,7 +3080,9 @@ def serialize(self, prefix: str, name: str) -> JsonDict:
and fullname != prefix + '.' + name
and not (isinstance(self.node, Var)
and self.node.from_module_getattr)):
assert not isinstance(self.node, PlaceholderNode)
assert not isinstance(self.node, PlaceholderNode), (
'Definition of {} is unexpectedly incomplete'.format(fullname)
)
data['cross_ref'] = fullname
return data
data['node'] = self.node.serialize()
Expand Down

0 comments on commit 4da09c7

Please sign in to comment.