MCPcopy Create free account
hub / github.com/pybind/pybind11 / __enter__

Method __enter__

pybind11/setup_helpers.py:495–497  ·  view source on GitHub ↗
(self: S)

Source from the content-addressed store, hash-verified

493 return self
494
495 def __enter__(self: S) -> S:
496 self._old.append(distutils.ccompiler.CCompiler.compile)
497 return self.install()
498
499 def __exit__(self, *args: Any) -> None:
500 distutils.ccompiler.CCompiler.compile = self._old.pop() # type: ignore[assignment]

Callers

nothing calls this directly

Calls 2

installMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected