Skip to content

Commit 88c52f9

Browse files
JayeshHireemdnetoxrmx
authored
Enabled flake8-tidy-import rule for ruff linter (#5019)
* Enabled flake8-tidy-import rule for ruff linter * removed warning suppression comments and instead ignored the tests dir for TID252 rule check * added change related info in the CHANGELOG * Update CHANGELOG.md --------- Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
1 parent 1d6171b commit 88c52f9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
## Unreleased
1414

15+
- Enabled the flake8-tidy-import plugins rules for the ruff linter. These rules throw warnings for relative imports in the modules.
16+
([#5019](https://github.com/open-telemetry/opentelemetry-python/pull/5019))
1517
- `opentelemetry-sdk`: Fix `AttributeError` in `ExplicitBucketHistogramAggregation` when applied to non-Histogram instruments without explicit boundaries
1618
([#5034](https://github.com/open-telemetry/opentelemetry-python/pull/5034))
1719
- Fix `BatchLogRecordProcessor` default `schedule_delay_millis` from 5000ms to 1000ms to comply with the OTel specification. Note: logs may be exported 5x more frequently by default (e.g. for users who don't explicitly set the `OTEL_BLRP_SCHEDULE_DELAY` env var).

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ select = [
8585
"PLE", # pylint error
8686
"Q", # flake8-quotes
8787
"G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
88+
"TID", # flake8-tidy-imports
8889
"UP011", # lru-cache-without-parameters
8990
"UP015", # redundant-open-modes
9091
"UP032", # f-string
@@ -99,6 +100,7 @@ ignore = [
99100
[tool.ruff.lint.per-file-ignores]
100101
"docs/**/*.*" = ["PLE"]
101102
"opentelemetry-sdk/tests/_configuration/test_models.py" = ["E402", "PLC0415"]
103+
"shim/opentelemetry-opentracing-shim/tests/*" = ["TID252"]
102104

103105
[tool.ruff.lint.isort]
104106
known-third-party = [

0 commit comments

Comments
 (0)