MCPcopy Index your code
hub / github.com/python/cpython / SpecLoaderAdapter

Class SpecLoaderAdapter

Lib/importlib/resources/_adapters.py:7–17  ·  view source on GitHub ↗

Adapt a package spec to adapt the underlying loader.

Source from the content-addressed store, hash-verified

5
6
7class SpecLoaderAdapter:
8 """
9 Adapt a package spec to adapt the underlying loader.
10 """
11
12 def __init__(self, spec, adapter=lambda spec: spec.loader):
13 self.spec = spec
14 self.loader = adapter(spec)
15
16 def __getattr__(self, name):
17 return getattr(self.spec, name)
18
19
20class TraversableResourcesLoader:

Callers 1

wrap_specFunction · 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…