Skip to content

Commit d84bf56

Browse files
committed
ruff format
1 parent 89a11c0 commit d84bf56

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -247,27 +247,27 @@ def __init__(
247247
if typ is Counter:
248248
self._instrument_class_temporality[_Counter] = temporality
249249
elif typ is UpDownCounter:
250-
self._instrument_class_temporality[_UpDownCounter] = (
251-
temporality
252-
)
250+
self._instrument_class_temporality[
251+
_UpDownCounter
252+
] = temporality
253253
elif typ is Histogram:
254-
self._instrument_class_temporality[_Histogram] = (
255-
temporality
256-
)
254+
self._instrument_class_temporality[
255+
_Histogram
256+
] = temporality
257257
elif typ is Gauge:
258258
self._instrument_class_temporality[_Gauge] = temporality
259259
elif typ is ObservableCounter:
260-
self._instrument_class_temporality[_ObservableCounter] = (
261-
temporality
262-
)
260+
self._instrument_class_temporality[
261+
_ObservableCounter
262+
] = temporality
263263
elif typ is ObservableUpDownCounter:
264264
self._instrument_class_temporality[
265265
_ObservableUpDownCounter
266266
] = temporality
267267
elif typ is ObservableGauge:
268-
self._instrument_class_temporality[_ObservableGauge] = (
269-
temporality
270-
)
268+
self._instrument_class_temporality[
269+
_ObservableGauge
270+
] = temporality
271271
else:
272272
raise Exception(f"Invalid instrument class found {typ}")
273273

@@ -287,27 +287,27 @@ def __init__(
287287
if typ is Counter:
288288
self._instrument_class_aggregation[_Counter] = aggregation
289289
elif typ is UpDownCounter:
290-
self._instrument_class_aggregation[_UpDownCounter] = (
291-
aggregation
292-
)
290+
self._instrument_class_aggregation[
291+
_UpDownCounter
292+
] = aggregation
293293
elif typ is Histogram:
294-
self._instrument_class_aggregation[_Histogram] = (
295-
aggregation
296-
)
294+
self._instrument_class_aggregation[
295+
_Histogram
296+
] = aggregation
297297
elif typ is Gauge:
298298
self._instrument_class_aggregation[_Gauge] = aggregation
299299
elif typ is ObservableCounter:
300-
self._instrument_class_aggregation[_ObservableCounter] = (
301-
aggregation
302-
)
300+
self._instrument_class_aggregation[
301+
_ObservableCounter
302+
] = aggregation
303303
elif typ is ObservableUpDownCounter:
304304
self._instrument_class_aggregation[
305305
_ObservableUpDownCounter
306306
] = aggregation
307307
elif typ is ObservableGauge:
308-
self._instrument_class_aggregation[_ObservableGauge] = (
309-
aggregation
310-
)
308+
self._instrument_class_aggregation[
309+
_ObservableGauge
310+
] = aggregation
311311
else:
312312
raise Exception(f"Invalid instrument class found {typ}")
313313

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ def create_and_shutdown():
7373
return exporter_wr, reader_wr, provider_wr
7474

7575
# When: the provider is shutdown
76-
exporter_weakref, reader_weakref, provider_weakref = (
77-
create_and_shutdown()
78-
)
76+
(
77+
exporter_weakref,
78+
reader_weakref,
79+
provider_weakref,
80+
) = create_and_shutdown()
7981
gc.collect()
8082

8183
# Then: the provider, exporter and reader should be garbage collected

0 commit comments

Comments
 (0)