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

Class MarkImportsMypyOnlyVisitor

mypy/reachability.py:357–370  ·  view source on GitHub ↗

Visitor that sets is_mypy_only (which affects priority).

Source from the content-addressed store, hash-verified

355
356
357class MarkImportsMypyOnlyVisitor(TraverserVisitor):
358 """Visitor that sets is_mypy_only (which affects priority)."""
359
360 def visit_import(self, node: Import) -> None:
361 node.is_mypy_only = True
362
363 def visit_import_from(self, node: ImportFrom) -> None:
364 node.is_mypy_only = True
365
366 def visit_import_all(self, node: ImportAll) -> None:
367 node.is_mypy_only = True
368
369 def visit_func_def(self, node: FuncDef) -> None:
370 node.is_mypy_only = True

Callers 1

mark_block_mypy_onlyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…