mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-03-06 12:48:03 +03:00
support FastStreamDepends
This commit is contained in:
parent
46646b1acf
commit
a3fced441d
|
@ -54,6 +54,11 @@ try:
|
|||
except ImportError:
|
||||
werkzeug = None
|
||||
|
||||
try:
|
||||
import fast_depends.dependencies
|
||||
except ImportError:
|
||||
fast_depends = None
|
||||
|
||||
|
||||
from . import providers
|
||||
|
||||
|
@ -686,8 +691,7 @@ def _get_patched(
|
|||
|
||||
|
||||
def _is_fastapi_depends(param: Any) -> bool:
|
||||
return fastapi and isinstance(param, fastapi.params.Depends)
|
||||
|
||||
return (fastapi and isinstance(param, fastapi.params.Depends)) or (fast_depends and isinstance(param, fast_depends.dependencies.Depends))
|
||||
|
||||
def _is_patched(fn) -> bool:
|
||||
return _patched_registry.has_callable(fn)
|
||||
|
|
Loading…
Reference in New Issue
Block a user