mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-09 15:42:23 +03:00
Update src/dependency_injector/wiring.py
Co-authored-by: ZipFile <zipfile.d@protonmail.com>
This commit is contained in:
parent
2ab78f34eb
commit
5030387308
|
@ -1031,10 +1031,11 @@ def _get_sync_patched(fn: F, patched: PatchedCallable) -> F:
|
|||
return cast(F, _patched)
|
||||
|
||||
|
||||
def _get_annotations(obj: Any) -> Dict[str, Any]:
|
||||
if sys.version_info >= (3, 10):
|
||||
if sys.version_info >= (3, 10):
|
||||
def _get_annotations(obj: Any) -> Dict[str, Any]:
|
||||
return inspect.get_annotations(obj)
|
||||
else:
|
||||
else:
|
||||
def _get_annotations(obj: Any) -> Dict[str, Any]:
|
||||
return getattr(obj, "__annotations__", {})
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user