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

Method copy

mypy/partially_defined.py:186–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

184 self.undefined_refs: dict[str, set[NameExpr]] = {}
185
186 def copy(self) -> Scope:
187 result = Scope([s.copy() for s in self.branch_stmts], self.scope_type)
188 result.undefined_refs = self.undefined_refs.copy()
189 return result
190
191 def record_undefined_ref(self, o: NameExpr) -> None:
192 if o.name not in self.undefined_refs:

Callers 3

copyMethod · 0.45
copyMethod · 0.45
visit_try_stmtMethod · 0.45

Calls 1

ScopeClass · 0.70

Tested by

no test coverage detected