Skip to content

Commit ac438c0

Browse files
authored
Merge pull request road-core#148 from tisnik/update-ruff-to-version-0.8.0
Update Ruff to version 0.8.0
2 parents 2986fcd + fd2bb24 commit ac438c0

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

ols/app/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ async def log_requests_responses(
7575
) -> Response:
7676
"""Middleware for logging of HTTP requests and responses, at debug level."""
7777
# Bail out early if not logging or Prometheus metrics logging is suppressed
78-
if (
79-
not logger.isEnabledFor(logging.DEBUG)
80-
or config.ols_config.logging_config.suppress_metrics_in_log
78+
if not logger.isEnabledFor(logging.DEBUG) or (
79+
config.ols_config.logging_config.suppress_metrics_in_log
8180
and request.url.path == "/metrics"
8281
):
8382
return await call_next(request)

ols/src/cache/redis_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from redis.backoff import ExponentialBackoff
99
from redis.exceptions import (
1010
BusyLoadingError,
11-
ConnectionError,
11+
ConnectionError, # noqa: A004
1212
RedisError,
1313
)
1414
from redis.retry import Retry

pdm.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[tool.ruff]
22

33
# description of all rules are available on https://docs.astral.sh/ruff/rules/
4-
lint.select = ["D", "E", "F", "W", "C", "S", "I", "TCH", "SLOT", "RUF", "C90", "N", "YTT", "ASYNC", "A", "C4", "T10", "PGH"]
4+
lint.select = ["D", "E", "F", "W", "C", "S", "I", "TCH", "SLOT", "RUF", "C90", "N", "YTT", "ASYNC", "A", "C4", "T10", "PGH", "FURB", "PERF", "AIR", "NPY", "FLY"]
55

66
# we need to check 'mood' of all docstrings, this needs to be enabled explicitly
77
lint.extend-select = ["D401"]
88

9-
lint.ignore = ["RUF021", "A004"]
9+
lint.ignore = []
1010

1111
target-version = "py311"
1212
lint.pydocstyle.convention = "google"
@@ -46,7 +46,7 @@ dev = [
4646
"pytest-asyncio==0.24.0",
4747
"pydantic==2.9.1",
4848
"rouge-score==0.1.2", # Required for model evaluation
49-
"ruff==0.7.0",
49+
"ruff==0.8.0",
5050
"bandit==1.7.9",
5151
"types-requests==2.32.0.20240622",
5252
"gradio==4.44.0",

tests/e2e/utils/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def get_pod_by_prefix(
173173
result = get_pods(namespace)
174174
for pod in result:
175175
if prefix in pod:
176-
pods.append(pod)
176+
pods.append(pod) # noqa: PERF401
177177
if fail_not_found and not pods:
178178
assert False, f"No OLS api server pod found in list pods: {result}"
179179
return pods

0 commit comments

Comments
 (0)