|
52 | 52 | from injection._core.common.type import ( |
53 | 53 | InputType, |
54 | 54 | TypeInfo, |
55 | | - get_yield_hints, |
| 55 | + get_yield_types, |
56 | 56 | iter_flat_types, |
57 | 57 | iter_return_types, |
58 | 58 | ) |
@@ -264,14 +264,14 @@ def decorator( |
264 | 264 | if isasyncgenfunction(wrapped): |
265 | 265 | ctx = _ScopedContext( |
266 | 266 | cls=AsyncCMScopedInjectable, |
267 | | - hints=() if ignore_type_hint else get_yield_hints(wrapped), |
| 267 | + hints=() if ignore_type_hint else get_yield_types(wrapped), |
268 | 268 | wrapper=asynccontextmanager(wrapped), |
269 | 269 | ) |
270 | 270 |
|
271 | 271 | elif isgeneratorfunction(wrapped): |
272 | 272 | ctx = _ScopedContext( |
273 | 273 | cls=CMScopedInjectable, |
274 | | - hints=() if ignore_type_hint else get_yield_hints(wrapped), |
| 274 | + hints=() if ignore_type_hint else get_yield_types(wrapped), |
275 | 275 | wrapper=contextmanager(wrapped), |
276 | 276 | ) |
277 | 277 |
|
@@ -713,19 +713,19 @@ def default(cls) -> Module: |
713 | 713 | return cls.from_name("__default__") |
714 | 714 |
|
715 | 715 | @staticmethod |
716 | | - def __build_key_types(input_cls: Any) -> frozenset[Any]: |
| 716 | + def __build_key_types(input_class: Any) -> frozenset[Any]: |
717 | 717 | config = MatchingTypesConfig(ignore_none=True) |
718 | 718 | return frozenset( |
719 | 719 | matching_type |
720 | | - for cls in iter_flat_types(input_cls) |
| 720 | + for cls in iter_flat_types(input_class) |
721 | 721 | for return_type in iter_return_types(cls) |
722 | 722 | for matching_type in iter_matching_types(return_type, config) |
723 | 723 | ) |
724 | 724 |
|
725 | 725 | @staticmethod |
726 | | - def __matching_key_types(input_cls: Any) -> tuple[Any, ...]: |
| 726 | + def __matching_key_types(input_class: Any) -> tuple[Any, ...]: |
727 | 727 | config = MatchingTypesConfig(with_origin=True, with_type_alias_value=True) |
728 | | - return matching_types(input_cls, config) |
| 728 | + return matching_types(input_class, config) |
729 | 729 |
|
730 | 730 |
|
731 | 731 | def mod(name: str | None = None, /) -> Module: |
|
0 commit comments