Skip to content

Commit a57bc20

Browse files
committed
resolved formatting issues caused by other PRs
1 parent b06aed5 commit a57bc20

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
OTEL_TRACES_SAMPLER_ARG,
6868
)
6969
from opentelemetry.sdk.metrics import MeterProvider
70-
from opentelemetry.sdk.metrics._internal import _MeterConfiguratorT
7170
from opentelemetry.sdk.metrics.export import (
7271
MetricExporter,
7372
MetricReader,

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import weakref
2525
from abc import abstractmethod
2626
from typing import (
27+
TYPE_CHECKING,
2728
Generic,
2829
Optional,
2930
Protocol,
@@ -36,11 +37,13 @@
3637
detach,
3738
set_value,
3839
)
39-
from opentelemetry.sdk._shared_internal._processor_metrics import (
40-
ProcessorMetrics,
41-
)
4240
from opentelemetry.util._once import Once
4341

42+
if TYPE_CHECKING:
43+
from opentelemetry.sdk._shared_internal._processor_metrics import (
44+
ProcessorMetrics,
45+
)
46+
4447

4548
class DuplicateFilter(logging.Filter):
4649
"""Filter that can be applied to internal `logger`'s.

opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/_processor_metrics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
from __future__ import annotations
1616

1717
from collections import Counter
18-
from collections.abc import Callable
19-
from typing import Literal
18+
from typing import TYPE_CHECKING, Literal
2019

2120
from opentelemetry.metrics import CallbackOptions, MeterProvider, Observation
2221
from opentelemetry.semconv._incubating.attributes.otel_attributes import (
@@ -34,6 +33,9 @@
3433
)
3534
from opentelemetry.semconv.attributes.error_attributes import ERROR_TYPE
3635

36+
if TYPE_CHECKING:
37+
from collections.abc import Callable
38+
3739
_component_counter = Counter()
3840

3941

opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import weakref
2020
from logging import WARNING
2121
from time import sleep, time_ns
22-
from typing import Optional, cast
22+
from typing import TYPE_CHECKING, Optional, cast
2323
from unittest.mock import Mock
2424

2525
import pytest
@@ -31,7 +31,6 @@
3131
)
3232
from opentelemetry.sdk.metrics._internal import _Counter
3333
from opentelemetry.sdk.metrics._internal.point import (
34-
HistogramDataPoint,
3534
MetricsData,
3635
ResourceMetrics,
3736
ScopeMetrics,
@@ -54,6 +53,9 @@
5453
from opentelemetry.sdk.util.instrumentation import InstrumentationScope
5554
from opentelemetry.test.concurrency_test import ConcurrencyTestBase
5655

56+
if TYPE_CHECKING:
57+
from opentelemetry.sdk.metrics._internal.point import HistogramDataPoint
58+
5759

5860
class FakeMetricsExporter(MetricExporter):
5961
def __init__(

0 commit comments

Comments
 (0)