MCPcopy Create free account
hub / github.com/python/mypy / output

Method output

mypy/stubutil.py:690–699  ·  view source on GitHub ↗

Return the text for the stub.

(self)

Source from the content-addressed store, hash-verified

688 return imports
689
690 def output(self) -> str:
691 """Return the text for the stub."""
692 pieces: list[str] = []
693 if imports := self.get_imports():
694 pieces.append(imports)
695 if dunder_all := self.get_dunder_all():
696 pieces.append(dunder_all)
697 if self._output:
698 pieces.append("".join(self._output))
699 return "\n".join(pieces)
700
701 def get_dunder_all(self) -> str:
702 """Return the __all__ list for the stub."""

Callers 2

Calls 4

get_importsMethod · 0.95
get_dunder_allMethod · 0.95
appendMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected