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

Method get_dunder_all

mypy/stubutil.py:701–709  ·  view source on GitHub ↗

Return the __all__ list for the stub.

(self)

Source from the content-addressed store, hash-verified

699 return "\n".join(pieces)
700
701 def get_dunder_all(self) -> str:
702 """Return the __all__ list for the stub."""
703 if self._all_:
704 # Note we emit all names in the runtime __all__ here, even if they
705 # don't actually exist. If that happens, the runtime has a bug, and
706 # it's not obvious what the correct behavior should be. We choose
707 # to reflect the runtime __all__ as closely as possible.
708 return f"__all__ = {self._all_!r}\n"
709 return ""
710
711 def add(self, string: str) -> None:
712 """Add text to generated stub."""

Callers 1

outputMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected