Skip to content

Commit 43ab3af

Browse files
changes from ruff format command
1 parent 37426c2 commit 43ab3af

5 files changed

Lines changed: 11 additions & 10 deletions

File tree

exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def _get_temporality(
118118
"Unrecognized OTEL_EXPORTER_METRICS_TEMPORALITY_PREFERENCE"
119119
" value found: "
120120
"%s, "
121-
"using CUMULATIVE", otel_exporter_otlp_metrics_temporality_preference
121+
"using CUMULATIVE",
122+
otel_exporter_otlp_metrics_temporality_preference,
122123
)
123124
instrument_class_temporality = {
124125
Counter: AggregationTemporality.CUMULATIVE,

exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def _read_file(file_path: str) -> Optional[bytes]:
125125
return file.read()
126126
except FileNotFoundError as e:
127127
logger.exception(
128-
"Failed to read file: %s. Please check if the file exists and is accessible.", e.filename
128+
"Failed to read file: %s. Please check if the file exists and is accessible.",
129+
e.filename,
129130
)
130131
return None
131132

opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ def __exit__(self, exc_type, exc_value, traceback):
130130
# pylint: disable=broad-exception-caught
131131
except Exception as error_handling_error:
132132
logger.exception(
133-
"%s error while handling error"
134-
" %s by error handler %s",
133+
"%s error while handling error %s by error handler %s",
135134
error_handling_error.__class__.__name__,
136135
exc_value.__class__.__name__,
137136
error_handler_class.__name__,

opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,9 +1194,9 @@ def collect_and_validate(values, histogram) -> None:
11941194
# pylint: disable=chained-comparison
11951195
if value > lower_bound and value <= upper_bound:
11961196
matches += 1
1197-
assert (
1198-
matches == count
1199-
), f"index: {index}, count: {count}, scale: {scale}, lower_bound: {lower_bound}, upper_bound: {upper_bound}, matches: {matches}"
1197+
assert matches == count, (
1198+
f"index: {index}, count: {count}, scale: {scale}, lower_bound: {lower_bound}, upper_bound: {upper_bound}, matches: {matches}"
1199+
)
12001200

12011201
assert sum(buckets) + result.zero_count == len(values)
12021202
assert result.sum == sum(values)

opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ def cpu_time_callback(
233233
)
234234

235235
def test_cpu_time_generator(self):
236-
def cpu_time_generator() -> (
237-
Generator[Iterable[Observation], None, None]
238-
):
236+
def cpu_time_generator() -> Generator[
237+
Iterable[Observation], None, None
238+
]:
239239
options = yield
240240
while True:
241241
self.assertIsInstance(options, CallbackOptions)

0 commit comments

Comments
 (0)