@@ -14,24 +14,25 @@ from ._core.locator import ModeStr
1414from ._core .module import PriorityStr
1515from ._core .scope import ScopeKindStr
1616
17- type _Decorator [T ] = Callable [[T ], T ]
18-
19- __MODULE : Final [Module ] = ...
20-
21- afind_instance = __MODULE .afind_instance
22- aget_instance = __MODULE .aget_instance
23- aget_lazy_instance = __MODULE .aget_lazy_instance
24- constant = __MODULE .constant
25- find_instance = __MODULE .find_instance
26- get_instance = __MODULE .get_instance
27- get_lazy_instance = __MODULE .get_lazy_instance
28- inject = __MODULE .inject
29- injectable = __MODULE .injectable
30- reserve_scoped_slot = __MODULE .reserve_scoped_slot
31- scoped = __MODULE .scoped
32- set_constant = __MODULE .set_constant
33- should_be_injectable = __MODULE .should_be_injectable
34- singleton = __MODULE .singleton
17+ class _Decorator (Protocol ):
18+ def __call__ [T ](self , wrapped : T , / ) -> T : ...
19+
20+ _default_module : Final [Module ] = ...
21+
22+ afind_instance = _default_module .afind_instance
23+ aget_instance = _default_module .aget_instance
24+ aget_lazy_instance = _default_module .aget_lazy_instance
25+ constant = _default_module .constant
26+ find_instance = _default_module .find_instance
27+ get_instance = _default_module .get_instance
28+ get_lazy_instance = _default_module .get_lazy_instance
29+ inject = _default_module .inject
30+ injectable = _default_module .injectable
31+ reserve_scoped_slot = _default_module .reserve_scoped_slot
32+ scoped = _default_module .scoped
33+ set_constant = _default_module .set_constant
34+ should_be_injectable = _default_module .should_be_injectable
35+ singleton = _default_module .singleton
3536
3637@overload
3738def asfunction [** P , T ](
@@ -173,7 +174,7 @@ class Module:
173174 / ,
174175 * ,
175176 threadsafe : bool | None = ...,
176- ) -> _Decorator : ... # type: ignore[type-arg]
177+ ) -> _Decorator : ...
177178 @overload
178179 def injectable [T ](
179180 self ,
@@ -201,7 +202,7 @@ class Module:
201202 inject : bool = ...,
202203 on : _TypeInfo [Any ] = ...,
203204 mode : Mode | ModeStr = ...,
204- ) -> _Decorator : ... # type: ignore[type-arg]
205+ ) -> _Decorator : ...
205206 @overload
206207 def singleton [T ](
207208 self ,
@@ -227,7 +228,7 @@ class Module:
227228 inject : bool = ...,
228229 on : _TypeInfo [Any ] = ...,
229230 mode : Mode | ModeStr = ...,
230- ) -> _Decorator : ... # type: ignore[type-arg]
231+ ) -> _Decorator : ...
231232 def scoped (
232233 self ,
233234 scope_name : str ,
@@ -236,7 +237,7 @@ class Module:
236237 inject : bool = ...,
237238 on : _TypeInfo [Any ] = ...,
238239 mode : Mode | ModeStr = ...,
239- ) -> _Decorator : # type: ignore[type-arg]
240+ ) -> _Decorator :
240241 """
241242 Decorator applicable to a class or function or generator function. It is used
242243 to indicate how the scoped instance will be constructed. At injection time, the
@@ -256,7 +257,7 @@ class Module:
256257 self ,
257258 wrapped : None = ...,
258259 / ,
259- ) -> _Decorator : ... # type: ignore[type-arg]
260+ ) -> _Decorator : ...
260261 @overload
261262 def constant [T ](
262263 self ,
@@ -280,7 +281,7 @@ class Module:
280281 * ,
281282 on : _TypeInfo [Any ] = ...,
282283 mode : Mode | ModeStr = ...,
283- ) -> _Decorator : ... # type: ignore[type-arg]
284+ ) -> _Decorator : ...
284285 def set_constant [T ](
285286 self ,
286287 instance : T ,
0 commit comments