anydi 0.32.0__py3-none-any.whl → 0.32.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anydi/_context.py +6 -2
- anydi/_provider.py +1 -1
- {anydi-0.32.0.dist-info → anydi-0.32.1.dist-info}/METADATA +1 -1
- {anydi-0.32.0.dist-info → anydi-0.32.1.dist-info}/RECORD +7 -7
- {anydi-0.32.0.dist-info → anydi-0.32.1.dist-info}/LICENSE +0 -0
- {anydi-0.32.0.dist-info → anydi-0.32.1.dist-info}/WHEEL +0 -0
- {anydi-0.32.0.dist-info → anydi-0.32.1.dist-info}/entry_points.txt +0 -0
anydi/_context.py
CHANGED
|
@@ -86,7 +86,9 @@ class ScopedContext(abc.ABC):
|
|
|
86
86
|
kwargs: dict[str, Any] = {}
|
|
87
87
|
|
|
88
88
|
for parameter in provider.parameters:
|
|
89
|
-
if parameter.annotation in self.
|
|
89
|
+
if parameter.annotation in self.container._override_instances: # noqa
|
|
90
|
+
instance = self.container._override_instances[parameter.annotation] # noqa
|
|
91
|
+
elif parameter.annotation in self._instances:
|
|
90
92
|
instance = self._instances[parameter.annotation]
|
|
91
93
|
else:
|
|
92
94
|
instance = self._resolve_parameter(provider, parameter)
|
|
@@ -104,7 +106,9 @@ class ScopedContext(abc.ABC):
|
|
|
104
106
|
kwargs: dict[str, Any] = {}
|
|
105
107
|
|
|
106
108
|
for parameter in provider.parameters:
|
|
107
|
-
if parameter.annotation in self.
|
|
109
|
+
if parameter.annotation in self.container._override_instances: # noqa
|
|
110
|
+
instance = self.container._override_instances[parameter.annotation] # noqa
|
|
111
|
+
elif parameter.annotation in self._instances:
|
|
108
112
|
instance = self._instances[parameter.annotation]
|
|
109
113
|
else:
|
|
110
114
|
instance = await self._aresolve_parameter(provider, parameter)
|
anydi/_provider.py
CHANGED
|
@@ -41,7 +41,7 @@ class Provider:
|
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
def __init__(
|
|
44
|
-
self,
|
|
44
|
+
self, call: Callable[..., Any], *, scope: Scope, interface: Any = _sentinel
|
|
45
45
|
) -> None:
|
|
46
46
|
self._call = call
|
|
47
47
|
self._call_module = getattr(call, "__module__", None)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
anydi/__init__.py,sha256=EsR-HiMe8cWS9PQbY23ibc91STK1WTn02DFMPV-TNU4,509
|
|
2
2
|
anydi/_container.py,sha256=gBcdz7wplCm-H8sj_QZpQsgISsg-B9RL6LuZ2kR_PdU,16925
|
|
3
|
-
anydi/_context.py,sha256=
|
|
3
|
+
anydi/_context.py,sha256=XSXBpSCm6zwR5otLN2cj_mPDQXTM18aN6vmJhiNEoL4,11697
|
|
4
4
|
anydi/_injector.py,sha256=GdI4NdcB72sJPyBFh9ZKyPflEs-6HaUbiHN2H5QIgHY,3454
|
|
5
5
|
anydi/_logger.py,sha256=UpubJUnW83kffFxkhUlObm2DmZX1Pjqoz9YFKS-JOPg,52
|
|
6
6
|
anydi/_module.py,sha256=cgojC7Z7oMtsUnkfSc65cRYOfZ8Q6KwjusNJzx_VSbk,2729
|
|
7
|
-
anydi/_provider.py,sha256=
|
|
7
|
+
anydi/_provider.py,sha256=tzEXwh9bzRirtGe_Kz2MB22kQxU6qmoofjwGNQPWUNI,5876
|
|
8
8
|
anydi/_scanner.py,sha256=F2sHgJvkRYXYnu4F5iSrnIPVzwnNeS7tRPXziirh4NI,4898
|
|
9
9
|
anydi/_types.py,sha256=At2VeJgwNC0gwMqdL0tkGtjSFsqOdrQStDwyzAGugr4,796
|
|
10
10
|
anydi/_utils.py,sha256=guw4sFCvsisJmneKWlZi18YDYll_CjlO_f2cH97rDFQ,3280
|
|
@@ -26,8 +26,8 @@ anydi/ext/pytest_plugin.py,sha256=Df0pFgAOk-44UFsdZGAOSxElJTJLchs4sk2UZuV-KVk,42
|
|
|
26
26
|
anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
anydi/ext/starlette/middleware.py,sha256=PKip_omFZDgg7h2OY-nnV2OIS1MbbmrrOJBwG7_Peuw,793
|
|
28
28
|
anydi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
anydi-0.32.
|
|
30
|
-
anydi-0.32.
|
|
31
|
-
anydi-0.32.
|
|
32
|
-
anydi-0.32.
|
|
33
|
-
anydi-0.32.
|
|
29
|
+
anydi-0.32.1.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
|
|
30
|
+
anydi-0.32.1.dist-info/METADATA,sha256=dV2dqhveWtEi-jp5h0QgnOGfY0jN-pAyZLAIoLDKgTI,5112
|
|
31
|
+
anydi-0.32.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
32
|
+
anydi-0.32.1.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
|
|
33
|
+
anydi-0.32.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|