Browse Source

🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

pull/14281/head
pre-commit-ci[bot] 9 months ago
parent
commit
876b18777f
  1. 4
      fastapi/params.py
  2. 1
      tests/test_depends_validation.py

4
fastapi/params.py

@ -3,11 +3,10 @@ from dataclasses import dataclass
from enum import Enum
from typing import Any, Callable, Dict, List, Optional, Sequence, Union
from fastapi.openapi.models import Example
from pydantic.fields import FieldInfo
from typing_extensions import Annotated, deprecated
from fastapi.openapi.models import Example
from ._compat import PYDANTIC_V2, PYDANTIC_VERSION_MINOR_TUPLE, Undefined
_Unset: Any = Undefined
@ -807,6 +806,7 @@ class Depends:
cache = "" if self.use_cache else ", use_cache=False"
return f"{self.__class__.__name__}({attr}{cache})"
@dataclass
class Security(Depends):
scopes: Optional[Sequence[str]] = None

1
tests/test_depends_validation.py

@ -1,5 +1,4 @@
import pytest
from fastapi import Depends, FastAPI
from fastapi.testclient import TestClient

Loading…
Cancel
Save