]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Bump ruff from 0.1.6 to 0.1.9 (#2396)
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Mon, 8 Jan 2024 08:49:23 +0000 (08:49 +0000)
committerGitHub <noreply@github.com>
Mon, 8 Jan 2024 08:49:23 +0000 (08:49 +0000)
* 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](https://github.com/astral-sh/ruff/compare/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>
requirements.txt
starlette/authentication.py
starlette/routing.py
tests/middleware/test_base.py
tests/test_background.py
tests/test_routing.py
tests/test_websockets.py

index f021f3abed8583ed93e4d0a98489ec003c7fd144..e290473288f9b7d8f9262dfd08e2bafe3a111f26 100644 (file)
@@ -5,7 +5,7 @@
 coverage==7.4.0
 importlib-metadata==7.0.1
 mypy==1.7.1
-ruff==0.1.6
+ruff==0.1.9
 typing_extensions==4.9.0
 types-contextvars==2.4.7.3
 types-PyYAML==6.0.12.12
index 494c50a57cdfd668e3594ebbbef1f26c90b000f7..07f271c49a9ad72f37cccba63041279581e2598a 100644 (file)
@@ -35,7 +35,7 @@ def requires(
     scopes_list = [scopes] if isinstance(scopes, str) else list(scopes)
 
     def decorator(
-        func: typing.Callable[_P, typing.Any]
+        func: typing.Callable[_P, typing.Any],
     ) -> typing.Callable[_P, typing.Any]:
         sig = inspect.signature(func)
         for idx, parameter in enumerate(sig.parameters.values()):
index c8c854d2c86350696cafbdc5f5afc33ea7487236..0ced9e66772bb623f2b1414f94528e775fb21bee 100644 (file)
@@ -55,7 +55,9 @@ def iscoroutinefunction_or_partial(obj: typing.Any) -> bool:  # pragma: no cover
 
 
 def request_response(
-    func: typing.Callable[[Request], typing.Union[typing.Awaitable[Response], Response]]
+    func: typing.Callable[
+        [Request], typing.Union[typing.Awaitable[Response], Response]
+    ],
 ) -> ASGIApp:
     """
     Takes a function or coroutine `func(request) -> response`,
@@ -78,7 +80,7 @@ def request_response(
 
 
 def websocket_session(
-    func: typing.Callable[[WebSocket], typing.Awaitable[None]]
+    func: typing.Callable[[WebSocket], typing.Awaitable[None]],
 ) -> ASGIApp:
     """
     Takes a coroutine `func(session)`, and returns an ASGI application.
index 4d51f34bf9dfb74e5609a1f03f6c9ebe27aa8807..012e2c1ff65794d11de30d5a12a12acd44bf2112 100644 (file)
@@ -499,7 +499,7 @@ def test_app_receives_http_disconnect_after_sending_if_discarded(test_client_fac
 
 
 def test_read_request_stream_in_app_after_middleware_calls_stream(
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         expected = [b""]
@@ -527,7 +527,7 @@ def test_read_request_stream_in_app_after_middleware_calls_stream(
 
 
 def test_read_request_stream_in_app_after_middleware_calls_body(
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         expected = [b"a", b""]
@@ -552,7 +552,7 @@ def test_read_request_stream_in_app_after_middleware_calls_body(
 
 
 def test_read_request_body_in_app_after_middleware_calls_stream(
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         assert await request.body() == b""
@@ -577,7 +577,7 @@ def test_read_request_body_in_app_after_middleware_calls_stream(
 
 
 def test_read_request_body_in_app_after_middleware_calls_body(
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         assert await request.body() == b"a"
@@ -599,7 +599,7 @@ def test_read_request_body_in_app_after_middleware_calls_body(
 
 
 def test_read_request_stream_in_dispatch_after_app_calls_stream(
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         expected = [b"a", b""]
@@ -627,7 +627,7 @@ def test_read_request_stream_in_dispatch_after_app_calls_stream(
 
 
 def test_read_request_stream_in_dispatch_after_app_calls_body(
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         assert await request.body() == b"a"
@@ -705,7 +705,7 @@ async def test_read_request_stream_in_dispatch_wrapping_app_calls_body() -> None
 
 
 def test_read_request_stream_in_dispatch_after_app_calls_body_with_middleware_calling_body_before_call_next(  # noqa: E501
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         assert await request.body() == b"a"
@@ -733,7 +733,7 @@ def test_read_request_stream_in_dispatch_after_app_calls_body_with_middleware_ca
 
 
 def test_read_request_body_in_dispatch_after_app_calls_body_with_middleware_calling_body_before_call_next(  # noqa: E501
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     async def homepage(request: Request):
         assert await request.body() == b"a"
@@ -837,7 +837,7 @@ async def test_read_request_disconnected_after_consuming_steam() -> None:
 
 
 def test_downstream_middleware_modifies_receive(
-    test_client_factory: Callable[[ASGIApp], TestClient]
+    test_client_factory: Callable[[ASGIApp], TestClient],
 ) -> None:
     """If a downstream middleware modifies receive() the final ASGI app
     should see the modified version.
index fbe9dbf1b7dfd2e056fd2e35b34799e5ff7ad671..39a126dc9d59393369326be2bc5e81243a986a08 100644 (file)
@@ -69,7 +69,7 @@ def test_multiple_tasks(test_client_factory: Callable[..., TestClient]):
 
 
 def test_multi_tasks_failure_avoids_next_execution(
-    test_client_factory: Callable[..., TestClient]
+    test_client_factory: Callable[..., TestClient],
 ) -> None:
     TASK_COUNTER = 0
 
index 5c12ebabe7a8971b9ea46b67ca5b98a64e37c1e7..cd6f3788084954cf62a3482e415428f3c89b1035 100644 (file)
@@ -1110,7 +1110,7 @@ def test_mounted_middleware_does_not_catch_exception(
 
 
 def test_websocket_route_middleware(
-    test_client_factory: typing.Callable[..., TestClient]
+    test_client_factory: typing.Callable[..., TestClient],
 ):
     async def websocket_endpoint(session: WebSocket):
         await session.accept()
index 2b487633eb3ec71816d5e7d2de06ab3bb68b777f..41ab82e18001bf579aec6cf366f670e46842590c 100644 (file)
@@ -40,7 +40,7 @@ def test_websocket_binary_json(test_client_factory):
 
 
 def test_websocket_ensure_unicode_on_send_json(
-    test_client_factory: Callable[..., TestClient]
+    test_client_factory: Callable[..., TestClient],
 ):
     async def app(scope: Scope, receive: Receive, send: Send) -> None:
         websocket = WebSocket(scope, receive=receive, send=send)