Browse Source

chore: adding type hint for scopes string case

adding Sequence[str] type hint on the self.scopes declaration when
scopes is a string in Security
pull/13369/head
Joao-Pedro-P-Holanda 2 months ago
parent
commit
c25d62ff4b
  1. 2
      fastapi/params.py

2
fastapi/params.py

@ -784,6 +784,6 @@ class Security(Depends):
):
super().__init__(dependency=dependency, use_cache=use_cache)
if isinstance(scopes, str):
self.scopes = [scopes]
self.scopes: Sequence[str] = [scopes]
else:
self.scopes = scopes or []

Loading…
Cancel
Save