From 9513d48196541fcc093578d9e6d199fb0779de72 Mon Sep 17 00:00:00 2001 From: Joao-Pedro-P-Holanda Date: Fri, 14 Feb 2025 13:52:06 -0300 Subject: [PATCH] fix: type hinting get_security_scopes with typing List using List from typing package, as python's list can't be subscriptable in python 3.8 --- tests/test_security_oauth2_scopes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_security_oauth2_scopes.py b/tests/test_security_oauth2_scopes.py index 83fb4f492..a09ca62e5 100644 --- a/tests/test_security_oauth2_scopes.py +++ b/tests/test_security_oauth2_scopes.py @@ -1,3 +1,4 @@ +from typing import List from fastapi import FastAPI, Security from fastapi.params import Depends from fastapi.security import OAuth2PasswordBearer @@ -14,7 +15,7 @@ oauth2_scheme = OAuth2PasswordBearer( def get_security_scopes( security_scopes: SecurityScopes, token=Depends(oauth2_scheme) -) -> list[str]: +) -> List[str]: return security_scopes.scopes