Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.9
rev: v0.14.1
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- docs: Added sqlcommenter example
([#4734](https://github.com/open-telemetry/opentelemetry-python/pull/4734))
- build: bump ruff to 0.14.1
([#4782](https://github.com/open-telemetry/opentelemetry-python/pull/4782))

## Version 1.38.0/0.59b0 (2025-10-16)

Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ psutil==5.9.6
GitPython==3.1.41
pre-commit==3.7.0; python_version >= '3.9'
pre-commit==3.5.0; python_version < '3.9'
ruff==0.6.9
ruff==0.14.1
4 changes: 3 additions & 1 deletion docs/examples/django/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def main():
DjangoInstrumentor().instrument()

try:
from django.core.management import execute_from_command_line
from django.core.management import ( # noqa: PLC0415
execute_from_command_line,
)
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
Expand Down
10 changes: 5 additions & 5 deletions opentelemetry-api/tests/propagators/test_propagators.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_propagators(propagators):
)

# pylint: disable=import-outside-toplevel
import opentelemetry.propagate
import opentelemetry.propagate # noqa: PLC0415

reload(opentelemetry.propagate)

Expand All @@ -66,7 +66,7 @@ def test_propagators(propagators):
)

# pylint: disable=import-outside-toplevel
import opentelemetry.propagate
import opentelemetry.propagate # noqa: PLC0415

reload(opentelemetry.propagate)

Expand All @@ -89,7 +89,7 @@ def test_propagators(propagators):
)

# pylint: disable=import-outside-toplevel
import opentelemetry.propagate
import opentelemetry.propagate # noqa: PLC0415

reload(opentelemetry.propagate)

Expand Down Expand Up @@ -141,7 +141,7 @@ def test_propagators(propagators):
)

# pylint: disable=import-outside-toplevel
import opentelemetry.propagate
import opentelemetry.propagate # noqa: PLC0415

reload(opentelemetry.propagate)

Expand All @@ -151,7 +151,7 @@ def test_propagators(propagators):
def test_composite_propagators_error(self):
with self.assertRaises(ValueError) as cm:
# pylint: disable=import-outside-toplevel
import opentelemetry.propagate
import opentelemetry.propagate # noqa: PLC0415

reload(opentelemetry.propagate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1194,9 +1194,9 @@ def collect_and_validate(values, histogram) -> None:
# pylint: disable=chained-comparison
if value > lower_bound and value <= upper_bound:
matches += 1
assert (
matches == count
), f"index: {index}, count: {count}, scale: {scale}, lower_bound: {lower_bound}, upper_bound: {upper_bound}, matches: {matches}"
assert matches == count, (
f"index: {index}, count: {count}, scale: {scale}, lower_bound: {lower_bound}, upper_bound: {upper_bound}, matches: {matches}"
)

assert sum(buckets) + result.zero_count == len(values)
assert result.sum == sum(values)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ def cpu_time_callback(
)

def test_cpu_time_generator(self):
def cpu_time_generator() -> (
Generator[Iterable[Observation], None, None]
):
def cpu_time_generator() -> Generator[
Iterable[Observation], None, None
]:
options = yield
while True:
self.assertIsInstance(options, CallbackOptions)
Expand Down
6 changes: 3 additions & 3 deletions opentelemetry-sdk/tests/metrics/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_import_init(self):
"""

with self.assertNotRaises(Exception):
from opentelemetry.sdk.metrics import ( # noqa: F401
from opentelemetry.sdk.metrics import ( # noqa: F401, PLC0415
Counter,
Histogram,
Meter,
Expand All @@ -42,7 +42,7 @@ def test_import_export(self):
"""

with self.assertNotRaises(Exception):
from opentelemetry.sdk.metrics.export import ( # noqa: F401
from opentelemetry.sdk.metrics.export import ( # noqa: F401, PLC0415
AggregationTemporality,
ConsoleMetricExporter,
DataPointT,
Expand All @@ -69,7 +69,7 @@ def test_import_view(self):
"""

with self.assertNotRaises(Exception):
from opentelemetry.sdk.metrics.view import ( # noqa: F401
from opentelemetry.sdk.metrics.view import ( # noqa: F401, PLC0415
Aggregation,
DefaultAggregation,
DropAggregation,
Expand Down