anydi 0.36.1a1__py3-none-any.whl → 0.36.1a2__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/_container.py +6 -2
- {anydi-0.36.1a1.dist-info → anydi-0.36.1a2.dist-info}/METADATA +1 -1
- {anydi-0.36.1a1.dist-info → anydi-0.36.1a2.dist-info}/RECORD +6 -6
- {anydi-0.36.1a1.dist-info → anydi-0.36.1a2.dist-info}/LICENSE +0 -0
- {anydi-0.36.1a1.dist-info → anydi-0.36.1a2.dist-info}/WHEEL +0 -0
- {anydi-0.36.1a1.dist-info → anydi-0.36.1a2.dist-info}/entry_points.txt +0 -0
anydi/_container.py
CHANGED
|
@@ -622,7 +622,9 @@ class Container:
|
|
|
622
622
|
return defaults[parameter.name]
|
|
623
623
|
|
|
624
624
|
# Get instance from overrides or context cache
|
|
625
|
-
if
|
|
625
|
+
if parameter.annotation in self._override_instances:
|
|
626
|
+
return self._override_instances[parameter.annotation]
|
|
627
|
+
elif context and parameter.annotation in context:
|
|
626
628
|
return context[parameter.annotation]
|
|
627
629
|
|
|
628
630
|
# Resolve the instance
|
|
@@ -664,7 +666,9 @@ class Container:
|
|
|
664
666
|
return defaults[parameter.name]
|
|
665
667
|
|
|
666
668
|
# Get instance from overrides or context cache
|
|
667
|
-
if
|
|
669
|
+
if parameter.annotation in self._override_instances:
|
|
670
|
+
return self._override_instances[parameter.annotation]
|
|
671
|
+
elif context and parameter.annotation in context:
|
|
668
672
|
return context[parameter.annotation]
|
|
669
673
|
|
|
670
674
|
# Resolve the instance
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
anydi/__init__.py,sha256=OfRg2EfXD65pHTGQKhfkABMwUhw5LvsuTQV_Tv4V4wk,501
|
|
2
|
-
anydi/_container.py,sha256=
|
|
2
|
+
anydi/_container.py,sha256=Nf8fG7aFebE8DWFE41MzsiTkxN7J0_MHX1qfG-4nujo,37715
|
|
3
3
|
anydi/_context.py,sha256=7LV_SL4QWkJeiG7_4D9PZ5lmU-MPzhofxC95zCgY9Gc,2651
|
|
4
4
|
anydi/_provider.py,sha256=W42y8wbsnWbb9B9gI-pnEa-lsz68nK0VIm55CJW3pWg,7457
|
|
5
5
|
anydi/_types.py,sha256=Vttj9GTp9g0KKpK-uqolLfVZJPIM7f7_YL8bPlablcQ,1539
|
|
@@ -22,8 +22,8 @@ anydi/ext/pytest_plugin.py,sha256=ShGhiZnP1KyMHhnc9Ci1RKAuHVhw628OTS2P2BLEOfc,50
|
|
|
22
22
|
anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
anydi/ext/starlette/middleware.py,sha256=9CQtGg5ZzUz2gFSzJr8U4BWzwNjK8XMctm3n52M77Z0,792
|
|
24
24
|
anydi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
-
anydi-0.36.
|
|
26
|
-
anydi-0.36.
|
|
27
|
-
anydi-0.36.
|
|
28
|
-
anydi-0.36.
|
|
29
|
-
anydi-0.36.
|
|
25
|
+
anydi-0.36.1a2.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
|
|
26
|
+
anydi-0.36.1a2.dist-info/METADATA,sha256=UH6N4WaWq8NIEDk_RGBFqA9mPAu-zYAl1pFrLA8C8TY,5066
|
|
27
|
+
anydi-0.36.1a2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
28
|
+
anydi-0.36.1a2.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
|
|
29
|
+
anydi-0.36.1a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|