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

Function strip_target

mypy/server/aststrip.py:70–80  ·  view source on GitHub ↗

Reset a fine-grained incremental target to state before semantic analysis. Args: node: node to strip

(node: MypyFile | FuncDef | OverloadedFuncDef)

Source from the content-addressed store, hash-verified

68
69
70def strip_target(node: MypyFile | FuncDef | OverloadedFuncDef) -> None:
71 """Reset a fine-grained incremental target to state before semantic analysis.
72
73 Args:
74 node: node to strip
75 """
76 visitor = NodeStripVisitor()
77 if isinstance(node, MypyFile):
78 visitor.strip_file_top_level(node)
79 else:
80 node.accept(visitor)
81
82
83class NodeStripVisitor(TraverserVisitor, SplittingVisitor):

Callers 1

reprocess_nodesFunction · 0.90

Calls 4

strip_file_top_levelMethod · 0.95
NodeStripVisitorClass · 0.85
isinstanceFunction · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…