Commits
Click on a commit to change the comparison rangeFix deprecated useage of FastAPI Depends
fast-api-non-annotated-dependency (FAST002)
Derived from the **FastAPI** linter.
Fix is sometimes available.
Identifies FastAPI routes with deprecated uses of `Depends` or similar.
The [FastAPI documentation] recommends the use of [`typing.Annotated`][typing-annotated]
for defining route dependencies and parameters, rather than using `Depends`,
`Query` or similar as a default value for a parameter. Using this approach
everywhere helps ensure consistency and clarity in defining dependencies
and parameters.
`Annotated` was added to the `typing` module in Python 3.9; however,
the third-party [`typing_extensions`][typing-extensions] package
provides a backport that can be used on older versions of Python.