Skip to content

Commit d42a650

Browse files
Remove unnecessary changes
1 parent 853c00f commit d42a650

File tree

4 files changed

+17
-30
lines changed

4 files changed

+17
-30
lines changed

opentelemetry-api/src/opentelemetry/context/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def _load_runtime_context() -> _RuntimeContext:
4141

4242
try:
4343
return next( # type: ignore
44-
iter(
45-
entry_points(
44+
iter( # type: ignore
45+
entry_points( # type: ignore
4646
group="opentelemetry_context",
4747
name=configured_context,
4848
)
@@ -55,8 +55,8 @@ def _load_runtime_context() -> _RuntimeContext:
5555
default_context,
5656
)
5757
return next( # type: ignore
58-
iter(
59-
entry_points(
58+
iter( # type: ignore
59+
entry_points( # type: ignore
6060
group="opentelemetry_context",
6161
name=default_context,
6262
)

opentelemetry-api/src/opentelemetry/propagate/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def inject(
136136
try:
137137
propagators.append( # type: ignore
138138
next( # type: ignore
139-
iter(
140-
entry_points(
139+
iter( # type: ignore
140+
entry_points( # type: ignore
141141
group="opentelemetry_propagator",
142142
name=propagator,
143143
)

opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,16 @@
1414

1515
# FIXME: Use importlib.metadata when support for 3.11 is dropped if the rest of
1616
# the supported versions at that time have the same API.
17-
try:
18-
from importlib.metadata import (
19-
Distribution,
20-
EntryPoint,
21-
EntryPoints,
22-
PackageNotFoundError,
23-
distributions,
24-
entry_points,
25-
requires,
26-
version,
27-
)
28-
except Exception:
29-
from importlib_metadata import (
30-
Distribution,
31-
EntryPoint,
32-
EntryPoints,
33-
PackageNotFoundError,
34-
distributions,
35-
entry_points,
36-
requires,
37-
version,
38-
)
39-
17+
from importlib_metadata import ( # type: ignore
18+
Distribution,
19+
EntryPoint,
20+
EntryPoints,
21+
PackageNotFoundError,
22+
distributions,
23+
entry_points,
24+
requires,
25+
version,
26+
)
4027

4128
__all__ = [
4229
"entry_points",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __exit__(self, exc_type, exc_value, traceback) -> Optional[bool]: # type: i
116116

117117
plugin_handled = False
118118

119-
error_handler_entry_points = entry_points(
119+
error_handler_entry_points = entry_points( # type: ignore
120120
group="opentelemetry_error_handler"
121121
)
122122

0 commit comments

Comments
 (0)