Pass to annotation Provider
instead of FromComponent("component name")
#168
Labels
Provider
instead of FromComponent("component name")
#168
Motivation
It is inconvenient to use additional strings/constants for the sake of components.
Suggestion
It would be convenient to add
MyProvider
to the annotation, and then use itscomponent
field under the hood of the library.Additional
This solution has one more advantage: we get the opportunity to move to the provider in 1 click (e.g. to edit it).
This is not possible in the current implementation (but it's possible in fastapi.Depends)
This solution also helps to avoid pyCharm bug with brackets highlighting: https://youtrack.jetbrains.com/issue/PY-57155/
The text was updated successfully, but these errors were encountered: