Skip to content

Commit d28d491

Browse files
Bump ruff from 0.1.6 to 0.1.9 (#2396)
* Bump ruff from 0.1.6 to 0.1.9 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.6 to 0.1.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@v0.1.6...v0.1.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Fix code --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
1 parent 5f9da0b commit d28d491

7 files changed

Lines changed: 18 additions & 16 deletions

File tree

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
coverage==7.4.0
66
importlib-metadata==7.0.1
77
mypy==1.7.1
8-
ruff==0.1.6
8+
ruff==0.1.9
99
typing_extensions==4.9.0
1010
types-contextvars==2.4.7.3
1111
types-PyYAML==6.0.12.12

starlette/authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def requires(
3535
scopes_list = [scopes] if isinstance(scopes, str) else list(scopes)
3636

3737
def decorator(
38-
func: typing.Callable[_P, typing.Any]
38+
func: typing.Callable[_P, typing.Any],
3939
) -> typing.Callable[_P, typing.Any]:
4040
sig = inspect.signature(func)
4141
for idx, parameter in enumerate(sig.parameters.values()):

starlette/routing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def iscoroutinefunction_or_partial(obj: typing.Any) -> bool: # pragma: no cover
5555

5656

5757
def request_response(
58-
func: typing.Callable[[Request], typing.Union[typing.Awaitable[Response], Response]]
58+
func: typing.Callable[
59+
[Request], typing.Union[typing.Awaitable[Response], Response]
60+
],
5961
) -> ASGIApp:
6062
"""
6163
Takes a function or coroutine `func(request) -> response`,
@@ -78,7 +80,7 @@ async def app(scope: Scope, receive: Receive, send: Send) -> None:
7880

7981

8082
def websocket_session(
81-
func: typing.Callable[[WebSocket], typing.Awaitable[None]]
83+
func: typing.Callable[[WebSocket], typing.Awaitable[None]],
8284
) -> ASGIApp:
8385
"""
8486
Takes a coroutine `func(session)`, and returns an ASGI application.

tests/middleware/test_base.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ async def downstream_app(scope, receive, send):
499499

500500

501501
def test_read_request_stream_in_app_after_middleware_calls_stream(
502-
test_client_factory: Callable[[ASGIApp], TestClient]
502+
test_client_factory: Callable[[ASGIApp], TestClient],
503503
) -> None:
504504
async def homepage(request: Request):
505505
expected = [b""]
@@ -527,7 +527,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
527527

528528

529529
def test_read_request_stream_in_app_after_middleware_calls_body(
530-
test_client_factory: Callable[[ASGIApp], TestClient]
530+
test_client_factory: Callable[[ASGIApp], TestClient],
531531
) -> None:
532532
async def homepage(request: Request):
533533
expected = [b"a", b""]
@@ -552,7 +552,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
552552

553553

554554
def test_read_request_body_in_app_after_middleware_calls_stream(
555-
test_client_factory: Callable[[ASGIApp], TestClient]
555+
test_client_factory: Callable[[ASGIApp], TestClient],
556556
) -> None:
557557
async def homepage(request: Request):
558558
assert await request.body() == b""
@@ -577,7 +577,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
577577

578578

579579
def test_read_request_body_in_app_after_middleware_calls_body(
580-
test_client_factory: Callable[[ASGIApp], TestClient]
580+
test_client_factory: Callable[[ASGIApp], TestClient],
581581
) -> None:
582582
async def homepage(request: Request):
583583
assert await request.body() == b"a"
@@ -599,7 +599,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
599599

600600

601601
def test_read_request_stream_in_dispatch_after_app_calls_stream(
602-
test_client_factory: Callable[[ASGIApp], TestClient]
602+
test_client_factory: Callable[[ASGIApp], TestClient],
603603
) -> None:
604604
async def homepage(request: Request):
605605
expected = [b"a", b""]
@@ -627,7 +627,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
627627

628628

629629
def test_read_request_stream_in_dispatch_after_app_calls_body(
630-
test_client_factory: Callable[[ASGIApp], TestClient]
630+
test_client_factory: Callable[[ASGIApp], TestClient],
631631
) -> None:
632632
async def homepage(request: Request):
633633
assert await request.body() == b"a"
@@ -705,7 +705,7 @@ async def send(msg: Message) -> None:
705705

706706

707707
def test_read_request_stream_in_dispatch_after_app_calls_body_with_middleware_calling_body_before_call_next( # noqa: E501
708-
test_client_factory: Callable[[ASGIApp], TestClient]
708+
test_client_factory: Callable[[ASGIApp], TestClient],
709709
) -> None:
710710
async def homepage(request: Request):
711711
assert await request.body() == b"a"
@@ -733,7 +733,7 @@ async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
733733

734734

735735
def test_read_request_body_in_dispatch_after_app_calls_body_with_middleware_calling_body_before_call_next( # noqa: E501
736-
test_client_factory: Callable[[ASGIApp], TestClient]
736+
test_client_factory: Callable[[ASGIApp], TestClient],
737737
) -> None:
738738
async def homepage(request: Request):
739739
assert await request.body() == b"a"
@@ -837,7 +837,7 @@ async def send(msg: Message):
837837

838838

839839
def test_downstream_middleware_modifies_receive(
840-
test_client_factory: Callable[[ASGIApp], TestClient]
840+
test_client_factory: Callable[[ASGIApp], TestClient],
841841
) -> None:
842842
"""If a downstream middleware modifies receive() the final ASGI app
843843
should see the modified version.

tests/test_background.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async def app(scope, receive, send):
6969

7070

7171
def test_multi_tasks_failure_avoids_next_execution(
72-
test_client_factory: Callable[..., TestClient]
72+
test_client_factory: Callable[..., TestClient],
7373
) -> None:
7474
TASK_COUNTER = 0
7575

tests/test_routing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ async def modified_send(msg: Message) -> None:
11101110

11111111

11121112
def test_websocket_route_middleware(
1113-
test_client_factory: typing.Callable[..., TestClient]
1113+
test_client_factory: typing.Callable[..., TestClient],
11141114
):
11151115
async def websocket_endpoint(session: WebSocket):
11161116
await session.accept()

tests/test_websockets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def app(scope: Scope, receive: Receive, send: Send) -> None:
4040

4141

4242
def test_websocket_ensure_unicode_on_send_json(
43-
test_client_factory: Callable[..., TestClient]
43+
test_client_factory: Callable[..., TestClient],
4444
):
4545
async def app(scope: Scope, receive: Receive, send: Send) -> None:
4646
websocket = WebSocket(scope, receive=receive, send=send)

0 commit comments

Comments
 (0)