Skip to content

Commit 0054f05

Browse files
committed
clean up ruff warnings in tests.
1 parent 98a5a8d commit 0054f05

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
args: [--force-exclude]
1818

1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.6.4
20+
rev: v0.14.10
2121
hooks:
2222
- id: ruff-format
2323
args: [--preview, -s]

src/fastapi_problem/error.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
)
1818

1919
__all__ = [
20-
"Problem",
21-
"StatusProblem",
2220
"BadRequestProblem",
2321
"ConflictProblem",
2422
"ForbiddenProblem",
2523
"NotFoundProblem",
24+
"Problem",
2625
"RedirectProblem",
2726
"ServerProblem",
27+
"StatusProblem",
2828
"UnauthorisedProblem",
2929
"UnprocessableProblem",
3030
]

src/fastapi_problem/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ def add_exception_handler( # noqa: PLR0913
261261
"PostHook",
262262
"PreHook",
263263
"StripExtrasPostHook",
264-
"new_exception_handler",
265264
"add_exception_handler",
266265
"http_exception_handler_",
266+
"new_exception_handler",
267267
"request_validation_handler_",
268268
]

tests/test_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ async def test_customise_openapi_handles_security_components_no_422():
810810
app = FastAPI()
811811

812812
@app.get("/status")
813-
async def status(bearer: str = Depends(bearer_scheme)) -> dict: # noqa: ARG001
813+
async def status(bearer: str = Depends(bearer_scheme)) -> dict: # noqa: ARG001, FAST002
814814
return {}
815815

816816
app.openapi = handler.customise_openapi(app.openapi)

0 commit comments

Comments
 (0)