MCPcopy Index your code
hub / github.com/python/mypy / reexport

Method reexport

mypy/stubutil.py:522–529  ·  view source on GitHub ↗

Mark a given non qualified name as needed in __all__. This means that in case it comes from a module, it should be imported with an alias even if the alias is the same as the name.

(self, name: str)

Source from the content-addressed store, hash-verified

520 self.required_names.add(name)
521
522 def reexport(self, name: str) -> None:
523 """Mark a given non qualified name as needed in __all__.
524
525 This means that in case it comes from a module, it should be
526 imported with an alias even if the alias is the same as the name.
527 """
528 self.require_name(name)
529 self.reexports.add(name)
530
531 def import_lines(self) -> list[str]:
532 """The list of required import lines (as strings with python code).

Callers 3

set_defined_namesMethod · 0.80
visit_import_fromMethod · 0.80
generate_moduleMethod · 0.80

Calls 2

require_nameMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected