Browse Source

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

pull/9837/head
pre-commit-ci[bot] 2 years ago
parent
commit
e8b75a08ff
  1. 2
      docs_src/query_params/tutorial007_py310.py
  2. 3
      fastapi/_compat.py
  3. 2
      fastapi/types.py
  4. 2
      tests/main.py
  5. 3
      tests/test_invalid_mapping_param.py

2
docs_src/query_params/tutorial007_py310.py

@ -1,4 +1,4 @@
from typing import List, Mapping
from typing import List
from fastapi import FastAPI, Query
from fastapi.types import FFQuery

3
fastapi/_compat.py

@ -9,7 +9,6 @@ from typing import (
Dict,
FrozenSet,
List,
Mapping,
Sequence,
Set,
Tuple,
@ -18,7 +17,7 @@ from typing import (
)
from fastapi.exceptions import RequestErrorModel
from fastapi.types import IncEx, ModelNameMap, UnionType, FFQuery
from fastapi.types import FFQuery, IncEx, ModelNameMap, UnionType
from pydantic import BaseModel, create_model
from pydantic.version import VERSION as PYDANTIC_VERSION
from starlette.datastructures import UploadFile

2
fastapi/types.py

@ -8,4 +8,4 @@ DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
UnionType = getattr(types, "UnionType", Union)
ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
IncEx = Union[Set[int], Set[str], Dict[int, Any], Dict[str, Any]]
FFQuery = Dict[str, Union[str, IncEx]]
FFQuery = Dict[str, Union[str, IncEx]]

2
tests/main.py

@ -1,5 +1,5 @@
import http
from typing import FrozenSet, List, Mapping, Optional, Union
from typing import FrozenSet, List, Optional, Union
from fastapi import FastAPI, Path, Query
from fastapi.types import FFQuery

3
tests/test_invalid_mapping_param.py

@ -1,4 +1,5 @@
from typing import List, Mapping
from typing import List
import pytest
from fastapi import FastAPI, Query
from fastapi.types import FFQuery

Loading…
Cancel
Save