From ad3a77091596f42e63416e070d7ebbbfcdd95721 Mon Sep 17 00:00:00 2001 From: jayeshhire Date: Mon, 6 Apr 2026 22:04:32 +0530 Subject: [PATCH 1/2] Enabled flake8-print plugin rules for ruff linter --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 294a7c4b09..e599c2f491 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,7 @@ select = [ "UP032", # f-string "UP034", # extraneous-parentheses "UP037", # quoted-annotation + "T20", # flake8-print ] ignore = [ @@ -101,6 +102,12 @@ ignore = [ "docs/**/*.*" = ["PLE"] "opentelemetry-sdk/tests/_configuration/test_models.py" = ["E402", "PLC0415"] "shim/opentelemetry-opentracing-shim/tests/*" = ["TID252"] +"scripts/*" = ["T20"] +"opentelemetry-sdk/tests/*" = ["T20"] +"opentelemetry-api/tests/*" = ["T20"] +"docs/getting_started/*" = ["T20"] +"docs/examples/*" = ["T20"] +"codegen/*" = ["T20"] [tool.ruff.lint.isort] known-third-party = [ From 2c28fcb34dd3f9c65325aa8b24730437cc240387 Mon Sep 17 00:00:00 2001 From: jayeshhire Date: Mon, 6 Apr 2026 22:33:08 +0530 Subject: [PATCH 2/2] Changes added to CHANGELOG.md file --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a6fd6d38..779436cfc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Enabled the flake8-print plugin rules for ruff linter. These rules throw warnings over the use of `print` and `pprint` statements. +([5046](https://github.com/open-telemetry/opentelemetry-python/pull/5046)) - Enabled the flake8-tidy-import plugins rules for the ruff linter. These rules throw warnings for relative imports in the modules. ([#5019](https://github.com/open-telemetry/opentelemetry-python/pull/5019)) - `opentelemetry-sdk`: Fix `AttributeError` in `ExplicitBucketHistogramAggregation` when applied to non-Histogram instruments without explicit boundaries