MCPcopy
hub / github.com/python/mypy / __str__

Method __str__

mypy/nodes.py:4924–4933  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4922 return new
4923
4924 def __str__(self) -> str:
4925 s = f"{node_kinds[self.kind]}/{short_type(self.node)}"
4926 if isinstance(self.node, SymbolNode):
4927 s += f" ({self.node.fullname})"
4928 # Include declared type of variables and functions.
4929 if self.type is not None:
4930 s += f" : {self.type}"
4931 if self.cross_ref:
4932 s += f" cross_ref:{self.cross_ref}"
4933 return s
4934
4935 def serialize(self, prefix: str, name: str) -> JsonDict:
4936 """Serialize a SymbolTableNode.

Callers

nothing calls this directly

Calls 2

short_typeFunction · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected