diff --git a/src/dependency_injector/wiring.py b/src/dependency_injector/wiring.py index d686d66f..056814d2 100644 --- a/src/dependency_injector/wiring.py +++ b/src/dependency_injector/wiring.py @@ -336,7 +336,7 @@ def _fetch_reference_injections( if _is_fastapi_depends(marker): marker = marker.dependency - if not isinstance(marker, providers.Provider): + if not isinstance(marker, _Marker): continue if isinstance(marker, Closing):