Skip to content

Commit

Permalink
fix: typing warning
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Nov 4, 2022
1 parent 3377eb7 commit 7e23357
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion simple_di/providers.py
Expand Up @@ -196,7 +196,7 @@ def set(self, value: Any) -> None:
for i in self._path[:-1]:
if isinstance(i, Provider):
i = i.get()
_next: Union[_SentinelClass, Dict[Any, Any]] = _cursor.get(i, sentinel)
_next: Dict[Any, Any] = _cursor.get(i, sentinel)
if isinstance(_next, _SentinelClass):
_next = {}
_cursor[i] = _next
Expand All @@ -219,6 +219,7 @@ def get(self) -> Any:
if isinstance(_cursor, dict):
_cursor = _cursor.get(i, None)
else:
assert _cursor is not None
_cursor = _cursor[i]
return _cursor

Expand Down

0 comments on commit 7e23357

Please sign in to comment.