Skip to content

Commit

Permalink
⬆ [pre-commit.ci] pre-commit autoupdate (#5709)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and tiangolo committed Mar 10, 2023
1 parent 253d58b commit f04b61b
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -4,7 +4,7 @@ default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-toml
Expand All @@ -14,14 +14,14 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
rev: v3.3.1
hooks:
- id: pyupgrade
args:
- --py3-plus
- --keep-runtime-typing
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.138
rev: v0.0.254
hooks:
- id: ruff
args:
Expand All @@ -38,7 +38,7 @@ repos:
name: isort (pyi)
types: [pyi]
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black
ci:
Expand Down
2 changes: 1 addition & 1 deletion docs_src/body_multiple_params/tutorial004.py
Expand Up @@ -25,7 +25,7 @@ async def update_item(
item: Item,
user: User,
importance: int = Body(gt=0),
q: Union[str, None] = None
q: Union[str, None] = None,
):
results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
if q:
Expand Down
2 changes: 1 addition & 1 deletion docs_src/body_multiple_params/tutorial004_py310.py
Expand Up @@ -23,7 +23,7 @@ async def update_item(
item: Item,
user: User,
importance: int = Body(gt=0),
q: str | None = None
q: str | None = None,
):
results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
if q:
Expand Down
2 changes: 1 addition & 1 deletion docs_src/path_params_numeric_validations/tutorial006.py
Expand Up @@ -8,7 +8,7 @@ async def read_items(
*,
item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
q: str,
size: float = Query(gt=0, lt=10.5)
size: float = Query(gt=0, lt=10.5),
):
results = {"item_id": item_id}
if q:
Expand Down
2 changes: 1 addition & 1 deletion fastapi/dependencies/utils.py
Expand Up @@ -696,7 +696,7 @@ async def process_fn(
fn: Callable[[], Coroutine[Any, Any, Any]]
) -> None:
result = await fn()
results.append(result)
results.append(result) # noqa: B023

async with anyio.create_task_group() as tg:
for sub_value in value:
Expand Down
1 change: 0 additions & 1 deletion fastapi/routing.py
Expand Up @@ -1250,7 +1250,6 @@ def trace(
generate_unique_id
),
) -> Callable[[DecoratedCallable], DecoratedCallable]:

return self.api_route(
path=path,
response_model=response_model,
Expand Down
6 changes: 3 additions & 3 deletions fastapi/security/api_key.py
Expand Up @@ -18,7 +18,7 @@ def __init__(
name: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model: APIKey = APIKey(
**{"in": APIKeyIn.query}, name=name, description=description
Expand All @@ -45,7 +45,7 @@ def __init__(
name: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model: APIKey = APIKey(
**{"in": APIKeyIn.header}, name=name, description=description
Expand All @@ -72,7 +72,7 @@ def __init__(
name: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model: APIKey = APIKey(
**{"in": APIKeyIn.cookie}, name=name, description=description
Expand Down
2 changes: 1 addition & 1 deletion fastapi/security/oauth2.py
Expand Up @@ -119,7 +119,7 @@ def __init__(
flows: Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]] = OAuthFlowsModel(),
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model = OAuth2Model(flows=flows, description=description)
self.scheme_name = scheme_name or self.__class__.__name__
Expand Down
2 changes: 1 addition & 1 deletion fastapi/security/open_id_connect_url.py
Expand Up @@ -14,7 +14,7 @@ def __init__(
openIdConnectUrl: str,
scheme_name: Optional[str] = None,
description: Optional[str] = None,
auto_error: bool = True
auto_error: bool = True,
):
self.model = OpenIdConnectModel(
openIdConnectUrl=openIdConnectUrl, description=description
Expand Down
Expand Up @@ -150,7 +150,6 @@ def get_app():

@pytest.fixture(name="client")
def get_client(app: FastAPI):

client = TestClient(app)
return client

Expand Down
Expand Up @@ -152,7 +152,6 @@ def get_app():

@pytest.fixture(name="client")
def get_client(app: FastAPI):

client = TestClient(app)
return client

Expand Down

0 comments on commit f04b61b

Please sign in to comment.