anydi 0.27.0a6__py3-none-any.whl → 0.27.0a8__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/_types.py +2 -2
- anydi/ext/pytest_plugin.py +0 -8
- {anydi-0.27.0a6.dist-info → anydi-0.27.0a8.dist-info}/METADATA +1 -1
- {anydi-0.27.0a6.dist-info → anydi-0.27.0a8.dist-info}/RECORD +7 -7
- {anydi-0.27.0a6.dist-info → anydi-0.27.0a8.dist-info}/LICENSE +0 -0
- {anydi-0.27.0a6.dist-info → anydi-0.27.0a8.dist-info}/WHEEL +0 -0
- {anydi-0.27.0a6.dist-info → anydi-0.27.0a8.dist-info}/entry_points.txt +0 -0
anydi/_types.py
CHANGED
|
@@ -36,9 +36,9 @@ class Event:
|
|
|
36
36
|
__slots__ = ()
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
def is_event_type(
|
|
39
|
+
def is_event_type(obj: Any) -> bool:
|
|
40
40
|
"""Checks if an object is an event type."""
|
|
41
|
-
return issubclass(
|
|
41
|
+
return inspect.isclass(obj) and issubclass(obj, Event)
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
@dataclass(frozen=True)
|
anydi/ext/pytest_plugin.py
CHANGED
|
@@ -99,10 +99,6 @@ def _anydi_inject(
|
|
|
99
99
|
if container.strict and not container.is_registered(interface):
|
|
100
100
|
continue
|
|
101
101
|
|
|
102
|
-
# Release the instance if it was already resolved
|
|
103
|
-
if container.is_resolved(interface):
|
|
104
|
-
container.release(interface)
|
|
105
|
-
|
|
106
102
|
try:
|
|
107
103
|
request.node.funcargs[argname] = container.resolve(interface)
|
|
108
104
|
except Exception: # noqa
|
|
@@ -128,10 +124,6 @@ async def _anydi_ainject(
|
|
|
128
124
|
if container.strict and not container.is_registered(interface):
|
|
129
125
|
continue
|
|
130
126
|
|
|
131
|
-
# Release the instance if it was already resolved
|
|
132
|
-
if container.is_resolved(interface):
|
|
133
|
-
container.release(interface)
|
|
134
|
-
|
|
135
127
|
try:
|
|
136
128
|
request.node.funcargs[argname] = await container.aresolve(interface)
|
|
137
129
|
except Exception: # noqa
|
|
@@ -4,7 +4,7 @@ anydi/_context.py,sha256=AVml53KyrQL4yyoJZkU2pbNzQwtg-1Jyt7m6R_0l6_8,11740
|
|
|
4
4
|
anydi/_logger.py,sha256=UpubJUnW83kffFxkhUlObm2DmZX1Pjqoz9YFKS-JOPg,52
|
|
5
5
|
anydi/_module.py,sha256=E1TfLud_Af-MPB83PxIzHVA1jlDW2FGaRP_il1a6y3Y,3675
|
|
6
6
|
anydi/_scanner.py,sha256=cyEk-K2Q8ssZStq8GrxMeEcCuAZMw-RXrjlgWEevKCs,6667
|
|
7
|
-
anydi/_types.py,sha256=
|
|
7
|
+
anydi/_types.py,sha256=i8xFxz8pmFj7SGqwOwae_P9VtiRie6DVLwfaLibLwhc,3653
|
|
8
8
|
anydi/_utils.py,sha256=zP4UvO1aVQJTB8pFNUWAcncvSiuhcg4xNdRU7CoLrqw,3871
|
|
9
9
|
anydi/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
anydi/ext/_utils.py,sha256=2kxLPTMM9Ro3s6-knbqYzONlqRB3hMcwZFFRQGHcFUg,2691
|
|
@@ -19,12 +19,12 @@ anydi/ext/django/ninja/_operation.py,sha256=wSWa7D73XTVlOibmOciv2l6JHPe1ERZcXrqI
|
|
|
19
19
|
anydi/ext/django/ninja/_signature.py,sha256=2cSzKxBIxXLqtwNuH6GSlmjVJFftoGmleWfyk_NVEWw,2207
|
|
20
20
|
anydi/ext/fastapi.py,sha256=vhfSyovXuCjvSkx6AiLOTNU975i8wDg72C5fqXQiFLw,2896
|
|
21
21
|
anydi/ext/faststream.py,sha256=L4rkWYIO4ZZuWH-8M8NT6_J0bT0Dz_EWO3B6Oj1iFBI,2024
|
|
22
|
-
anydi/ext/pytest_plugin.py,sha256=
|
|
22
|
+
anydi/ext/pytest_plugin.py,sha256=3OWphc4nEzla46_8KR7LXtwGns5eol_YlUWfTf4Cr2Q,3952
|
|
23
23
|
anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
anydi/ext/starlette/middleware.py,sha256=Ni0BQaPjs_Ha6zcLZYYJ3-XkslTCnL9aCSa06rnRDMI,1139
|
|
25
25
|
anydi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
anydi-0.27.
|
|
27
|
-
anydi-0.27.
|
|
28
|
-
anydi-0.27.
|
|
29
|
-
anydi-0.27.
|
|
30
|
-
anydi-0.27.
|
|
26
|
+
anydi-0.27.0a8.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
|
|
27
|
+
anydi-0.27.0a8.dist-info/METADATA,sha256=-yLzaxlmDc16XJOD6PfNlbXPvsbY3QmS-0b4yT1DYjE,5163
|
|
28
|
+
anydi-0.27.0a8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
29
|
+
anydi-0.27.0a8.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
|
|
30
|
+
anydi-0.27.0a8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|