mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-22 21:46:17 +03:00
Add type cast for @inject
This commit is contained in:
parent
ff29d84995
commit
fb47d5db0d
|
@ -207,7 +207,8 @@ def unwire(
|
|||
def inject(fn: F) -> F:
|
||||
"""Decorate callable with injecting decorator."""
|
||||
reference_injections, reference_closing = _fetch_reference_injections(fn)
|
||||
return _get_patched(fn, reference_injections, reference_closing)
|
||||
patched = _get_patched(fn, reference_injections, reference_closing)
|
||||
return cast(F, patched)
|
||||
|
||||
|
||||
def _patch_fn(
|
||||
|
|
Loading…
Reference in New Issue
Block a user