Skip to content

Commit 5130b19

Browse files
authored
refactor: Update type annotations for reserve_scoped_slot method
1 parent 1f1e8d8 commit 5130b19

4 files changed

Lines changed: 99 additions & 92 deletions

File tree

injection/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class Module:
412412

413413
def reserve_scoped_slot[T](
414414
self,
415-
cls: type[T],
415+
cls: _InputType[T],
416416
/,
417417
scope_name: str,
418418
*,

injection/_core/injectables.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
)
1515

1616
from injection._core.common.asynchronous import AsyncSemaphore, Caller
17+
from injection._core.common.type import InputType
1718
from injection._core.scope import (
1819
Scope,
1920
get_scope,
@@ -193,7 +194,7 @@ def unlock(self) -> None:
193194

194195
@dataclass(repr=False, eq=False, frozen=True, slots=True)
195196
class ScopedSlotInjectable[T](Injectable[T]):
196-
cls: type[T]
197+
cls: InputType[T]
197198
scope_name: str
198199
key: SlotKey[T] = field(default_factory=SlotKey)
199200

injection/_core/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def set_constant[T](
346346

347347
def reserve_scoped_slot[T](
348348
self,
349-
cls: type[T],
349+
cls: InputType[T],
350350
/,
351351
scope_name: str,
352352
*,

0 commit comments

Comments
 (0)