Browse Source

🎨 Auto format

pull/14419/head
github-actions[bot] 8 months ago
parent
commit
11a7e62f57
  1. 4
      fastapi/dependencies/models.py
  2. 3
      fastapi/dependencies/utils.py

4
fastapi/dependencies/models.py

@ -56,9 +56,7 @@ class Dependant:
@cached_property @cached_property
def cache_key(self) -> DependencyCacheKey: def cache_key(self) -> DependencyCacheKey:
scopes_for_cache = ( scopes_for_cache = (
tuple(sorted(set(self.oauth_scopes or []))) tuple(sorted(set(self.oauth_scopes or []))) if self._uses_scopes else ()
if self._uses_scopes
else ()
) )
return ( return (
self.call, self.call,

3
fastapi/dependencies/utils.py

@ -58,8 +58,7 @@ from fastapi.dependencies.models import Dependant, SecurityRequirement
from fastapi.exceptions import DependencyScopeError from fastapi.exceptions import DependencyScopeError
from fastapi.logger import logger from fastapi.logger import logger
from fastapi.security.base import SecurityBase from fastapi.security.base import SecurityBase
from fastapi.security.oauth2 import OAuth2, SecurityScopes from fastapi.security.oauth2 import SecurityScopes
from fastapi.security.open_id_connect_url import OpenIdConnect
from fastapi.types import DependencyCacheKey from fastapi.types import DependencyCacheKey
from fastapi.utils import create_model_field, get_path_param_names from fastapi.utils import create_model_field, get_path_param_names
from pydantic import BaseModel from pydantic import BaseModel

Loading…
Cancel
Save