Skip to content

Commit 4da09c7

Browse files
Mention fullname of PlaceholderNode in assertion (#10565)
Helps with #10542 Co-authored-by: Shantanu <[email protected]> Co-authored-by: hauntsaninja <>
1 parent 0635422 commit 4da09c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypy/nodes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3080,7 +3080,9 @@ def serialize(self, prefix: str, name: str) -> JsonDict:
30803080
and fullname != prefix + '.' + name
30813081
and not (isinstance(self.node, Var)
30823082
and self.node.from_module_getattr)):
3083-
assert not isinstance(self.node, PlaceholderNode)
3083+
assert not isinstance(self.node, PlaceholderNode), (
3084+
'Definition of {} is unexpectedly incomplete'.format(fullname)
3085+
)
30843086
data['cross_ref'] = fullname
30853087
return data
30863088
data['node'] = self.node.serialize()

0 commit comments

Comments
 (0)