Skip to content

Commit d340bec

Browse files
authored
Merge pull request #21 from taskiq-python/feature/isinstancefix
2 parents 1de4c5d + c84d578 commit d340bec

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

taskiq_dependencies/graph.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,13 @@ def _build_graph(self) -> None: # noqa: C901, WPS210
177177
# and the overriden value will appear to be after
178178
# the original `Depends` annotation.
179179
for meta in reversed(param.annotation.__metadata__):
180-
if isinstance(meta, (Dependency, FastapiDepends)):
180+
if isinstance(meta, Dependency):
181+
default_value = meta
182+
break
183+
if FastapiDepends is not None and isinstance( # noqa: WPS337
184+
meta,
185+
FastapiDepends,
186+
):
181187
default_value = meta
182188
break
183189

0 commit comments

Comments
 (0)