Skip to content

Commit a327c87

Browse files
authored
ci: upgrade ruff and enable preview (#15254)
## Description Upgrades ruff to the latest version and enables the option for preview rules in the future (for example, we can get something like slotscheck, but it is preview only for now). ## Testing <!-- Describe your testing strategy or note what tests are included --> ## Risks <!-- Note any risks associated with this change, or "None" if no risks --> ## Additional Notes <!-- Any other information that would be helpful for reviewers -->
1 parent 6cc020f commit a327c87

File tree

14 files changed

+18
-16
lines changed

14 files changed

+18
-16
lines changed

ddtrace/appsec/_iast/_taint_tracking/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"copy_ranges_from_strings",
6666
"get_range_by_hash",
6767
"get_ranges",
68-
"is_in_taint_map",
6968
"is_tainted",
7069
"new_pyobject_id",
7170
"origin_to_str",

ddtrace/appsec/_processor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import errno
33
from json.decoder import JSONDecodeError
44
import os
5-
import os.path
65
from typing import TYPE_CHECKING
76
from typing import Any
87
from typing import ClassVar

ddtrace/contrib/internal/botocore/services/kinesis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import List
77
from typing import Tuple
88

9-
import botocore.client
9+
import botocore.client # noqa: F401
1010
import botocore.exceptions
1111

1212
from ddtrace import config

ddtrace/contrib/internal/botocore/services/sqs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Dict # noqa:F401
44
from typing import Optional # noqa:F401
55

6-
import botocore.client
6+
import botocore.client # noqa: F401
77
import botocore.exceptions
88

99
from ddtrace import config

ddtrace/contrib/internal/pyramid/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Dict
22

33
import pyramid
4-
import pyramid.config
4+
import pyramid.config # noqa: F401
55
import wrapt
66

77
from ddtrace import config

ddtrace/internal/writer/writer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from ddtrace.internal.settings._agent import config as agent_config
2323
from ddtrace.internal.settings.asm import ai_guard_config
2424
from ddtrace.internal.settings.asm import config as asm_config
25-
import ddtrace.internal.utils.http
2625
from ddtrace.internal.utils.retry import fibonacci_backoff_with_jitter
2726

2827
from ...constants import _KEEP_SPANS_RATE_KEY

hatch.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
"packaging==23.1",
1919
"pygments==2.16.1",
2020
"riot==0.20.1",
21-
"ruff==0.11.11",
21+
"ruff==0.14.5",
2222
"clang-format==18.1.5",
2323
"cmake-format==0.6.13",
2424
"ruamel.yaml==0.18.6",

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ lint.ignore = [
268268
"G201",
269269
]
270270
line-length = 120
271+
272+
# Allow experimental/preview checks
273+
lint.preview = true
274+
lint.explicit-preview-rules = true
275+
271276
lint.select = [
272277
"A",
273278
"D",

tests/contrib/boto/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import boto.awslambda
66
import boto.ec2
77
import boto.elasticache
8-
import boto.kms
8+
import boto.kms # noqa: F401
99
import boto.s3
10-
import boto.sqs
10+
import boto.sqs # noqa: F401
1111
import boto.sts
1212
from moto import mock_ec2
1313
from moto import mock_lambda

tests/contrib/langgraph/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def mock_tracer():
3333
def langgraph(monkeypatch, mock_tracer):
3434
patch()
3535
import langgraph
36-
import langgraph.prebuilt
36+
import langgraph.prebuilt # noqa: F401
3737

3838
pin = Pin.get_from(langgraph)
3939
pin._override(langgraph, tracer=mock_tracer)

0 commit comments

Comments
 (0)