Skip to content

Commit

Permalink
typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
biniona committed Sep 30, 2024
1 parent 2cf7794 commit 4ce0c74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion minject/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def get(

async def _aget(
self, key: "RegistryKey[T]", default: Optional[Union[T, _AutoOrNone]] = None
) -> T:
) -> Optional[T]:
# TODO: do this better
if default is None:
default = AUTO_OR_NONE
Expand All @@ -359,6 +359,9 @@ async def _aget(
if obj_list:
return obj_list[0].obj

by_meta = await self._aget_by_metadata(meta, default)
return _unwrap(by_meta)

async def aget(
self, key: "RegistryKey[T]", default: Optional[Union[T, _AutoOrNone]] = None
) -> T:
Expand Down

0 comments on commit 4ce0c74

Please sign in to comment.