Skip to content

Commit 9a90d31

Browse files
CI: Ruff target version = py 3.10 (#218)
* CI: Ruff target version = py 3.10 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Make pre-commit happy --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 602b587 commit 9a90d31

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ exclude = [
140140
line-length = 120
141141
indent-width = 4
142142

143-
target-version = "py39"
143+
target-version = "py310"
144144

145145
[tool.ruff.lint]
146146
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.

src/swerex/deployment/hooks/status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Callable
1+
from collections.abc import Callable
22

33
from swerex.deployment.hooks.abstract import DeploymentHook
44

src/swerex/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async def exception_handler(request: Request, exc: Exception):
5353
"""We catch exceptions that are thrown by the runtime, serialize them to JSON and
5454
return them to the client so they can reraise them in their own code.
5555
"""
56-
if isinstance(exc, (HTTPException, StarletteHTTPException)):
56+
if isinstance(exc, HTTPException | StarletteHTTPException):
5757
return await http_exception_handler(request, exc)
5858
extra_info = getattr(exc, "extra_info", {})
5959
_exc = _ExceptionTransfer(

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def run_server():
4646
try:
4747
with socket.create_connection(("127.0.0.1", port), timeout=1):
4848
break
49-
except (ConnectionRefusedError, socket.timeout):
49+
except (TimeoutError, ConnectionRefusedError):
5050
time.sleep(retry_delay)
5151
else:
5252
pytest.fail("Server did not start within the expected time")

0 commit comments

Comments
 (0)