Skip to content

Commit f04b61b

Browse files
⬆ [pre-commit.ci] pre-commit autoupdate (fastapi#5709)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sebastián Ramírez <[email protected]>
1 parent 253d58b commit f04b61b

11 files changed

Lines changed: 13 additions & 16 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_language_version:
44
python: python3.10
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.3.0
7+
rev: v4.4.0
88
hooks:
99
- id: check-added-large-files
1010
- id: check-toml
@@ -14,14 +14,14 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
1616
- repo: https://github.com/asottile/pyupgrade
17-
rev: v3.2.2
17+
rev: v3.3.1
1818
hooks:
1919
- id: pyupgrade
2020
args:
2121
- --py3-plus
2222
- --keep-runtime-typing
2323
- repo: https://github.com/charliermarsh/ruff-pre-commit
24-
rev: v0.0.138
24+
rev: v0.0.254
2525
hooks:
2626
- id: ruff
2727
args:
@@ -38,7 +38,7 @@ repos:
3838
name: isort (pyi)
3939
types: [pyi]
4040
- repo: https://github.com/psf/black
41-
rev: 22.10.0
41+
rev: 23.1.0
4242
hooks:
4343
- id: black
4444
ci:

docs_src/body_multiple_params/tutorial004.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def update_item(
2525
item: Item,
2626
user: User,
2727
importance: int = Body(gt=0),
28-
q: Union[str, None] = None
28+
q: Union[str, None] = None,
2929
):
3030
results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
3131
if q:

docs_src/body_multiple_params/tutorial004_py310.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async def update_item(
2323
item: Item,
2424
user: User,
2525
importance: int = Body(gt=0),
26-
q: str | None = None
26+
q: str | None = None,
2727
):
2828
results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
2929
if q:

docs_src/path_params_numeric_validations/tutorial006.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async def read_items(
88
*,
99
item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
1010
q: str,
11-
size: float = Query(gt=0, lt=10.5)
11+
size: float = Query(gt=0, lt=10.5),
1212
):
1313
results = {"item_id": item_id}
1414
if q:

fastapi/dependencies/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ async def process_fn(
696696
fn: Callable[[], Coroutine[Any, Any, Any]]
697697
) -> None:
698698
result = await fn()
699-
results.append(result)
699+
results.append(result) # noqa: B023
700700

701701
async with anyio.create_task_group() as tg:
702702
for sub_value in value:

fastapi/routing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,6 @@ def trace(
12501250
generate_unique_id
12511251
),
12521252
) -> Callable[[DecoratedCallable], DecoratedCallable]:
1253-
12541253
return self.api_route(
12551254
path=path,
12561255
response_model=response_model,

fastapi/security/api_key.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(
1818
name: str,
1919
scheme_name: Optional[str] = None,
2020
description: Optional[str] = None,
21-
auto_error: bool = True
21+
auto_error: bool = True,
2222
):
2323
self.model: APIKey = APIKey(
2424
**{"in": APIKeyIn.query}, name=name, description=description
@@ -45,7 +45,7 @@ def __init__(
4545
name: str,
4646
scheme_name: Optional[str] = None,
4747
description: Optional[str] = None,
48-
auto_error: bool = True
48+
auto_error: bool = True,
4949
):
5050
self.model: APIKey = APIKey(
5151
**{"in": APIKeyIn.header}, name=name, description=description
@@ -72,7 +72,7 @@ def __init__(
7272
name: str,
7373
scheme_name: Optional[str] = None,
7474
description: Optional[str] = None,
75-
auto_error: bool = True
75+
auto_error: bool = True,
7676
):
7777
self.model: APIKey = APIKey(
7878
**{"in": APIKeyIn.cookie}, name=name, description=description

fastapi/security/oauth2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __init__(
119119
flows: Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]] = OAuthFlowsModel(),
120120
scheme_name: Optional[str] = None,
121121
description: Optional[str] = None,
122-
auto_error: bool = True
122+
auto_error: bool = True,
123123
):
124124
self.model = OAuth2Model(flows=flows, description=description)
125125
self.scheme_name = scheme_name or self.__class__.__name__

fastapi/security/open_id_connect_url.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(
1414
openIdConnectUrl: str,
1515
scheme_name: Optional[str] = None,
1616
description: Optional[str] = None,
17-
auto_error: bool = True
17+
auto_error: bool = True,
1818
):
1919
self.model = OpenIdConnectModel(
2020
openIdConnectUrl=openIdConnectUrl, description=description

tests/test_tutorial/test_request_files/test_tutorial002_py39.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def get_app():
150150

151151
@pytest.fixture(name="client")
152152
def get_client(app: FastAPI):
153-
154153
client = TestClient(app)
155154
return client
156155

0 commit comments

Comments
 (0)