Skip to content

Commit 5bcb0b9

Browse files
committed
Fix lint
1 parent 65b0bfb commit 5bcb0b9

File tree

10 files changed

+9
-25
lines changed

10 files changed

+9
-25
lines changed

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# pylint: disable=no-name-in-module
1514

1615
import logging
1716
import threading
@@ -23,9 +22,7 @@
2322
from pkg_resources import iter_entry_points
2423

2524
from opentelemetry.context.context import Context, _RuntimeContext
26-
from opentelemetry.environment_variables import ( # type: ignore
27-
OTEL_PYTHON_CONTEXT,
28-
)
25+
from opentelemetry.environment_variables import OTEL_PYTHON_CONTEXT
2926

3027
logger = logging.getLogger(__name__)
3128
_RUNTIME_CONTEXT = None # type: typing.Optional[_RuntimeContext]
@@ -55,7 +52,7 @@ def wrapper( # type: ignore[misc]
5552
default_context = "contextvars_context"
5653

5754
configured_context = environ.get(
58-
OTEL_PYTHON_CONTEXT, default_context # type: ignore
55+
OTEL_PYTHON_CONTEXT, default_context
5956
) # type: str
6057
try:
6158
_RUNTIME_CONTEXT = next(

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# pylint: disable=no-name-in-module
1514

1615
"""
1716
API for propagation of context.
@@ -76,9 +75,7 @@ def example_route():
7675
from pkg_resources import iter_entry_points
7776

7877
from opentelemetry.context.context import Context
79-
from opentelemetry.environment_variables import ( # type: ignore
80-
OTEL_PROPAGATORS,
81-
)
78+
from opentelemetry.environment_variables import OTEL_PROPAGATORS
8279
from opentelemetry.propagators import composite, textmap
8380

8481
logger = getLogger(__name__)
@@ -130,7 +127,7 @@ def inject(
130127

131128
# Single use variable here to hack black and make lint pass
132129
environ_propagators = environ.get(
133-
OTEL_PROPAGATORS, # type: ignore
130+
OTEL_PROPAGATORS,
134131
"tracecontext,baggage",
135132
)
136133

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# pylint: disable=no-name-in-module
1514

1615
"""
1716
The OpenTelemetry tracing API describes the classes used to generate
@@ -85,9 +84,7 @@
8584
from opentelemetry import context as context_api
8685
from opentelemetry.attributes import BoundedAttributes # type: ignore
8786
from opentelemetry.context.context import Context
88-
from opentelemetry.environment_variables import ( # type: ignore
89-
OTEL_PYTHON_TRACER_PROVIDER,
90-
)
87+
from opentelemetry.environment_variables import OTEL_PYTHON_TRACER_PROVIDER
9188
from opentelemetry.trace.propagation import (
9289
_SPAN_KEY,
9390
get_current_span,
@@ -496,7 +493,7 @@ def get_tracer_provider() -> TracerProvider:
496493

497494
_TRACER_PROVIDER = cast( # type: ignore
498495
"TracerProvider",
499-
_load_provider(OTEL_PYTHON_TRACER_PROVIDER, "tracer_provider"), # type: ignore
496+
_load_provider(OTEL_PYTHON_TRACER_PROVIDER, "tracer_provider"),
500497
)
501498
return _TRACER_PROVIDER
502499

opentelemetry-distro/src/opentelemetry/distro/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# pylint: disable=no-name-in-module
1514

1615
import os
1716

opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
16-
# pylint: disable=no-name-in-module
1716

1817
from argparse import REMAINDER, ArgumentParser
1918
from logging import getLogger

opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# pylint: disable=no-name-in-module
1514

1615
import sys
1716
from logging import getLogger
@@ -21,13 +20,13 @@
2120

2221
from pkg_resources import iter_entry_points
2322

24-
from opentelemetry.environment_variables import (
25-
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS,
26-
)
2723
from opentelemetry.instrumentation.dependencies import (
2824
get_dist_dependency_conflicts,
2925
)
3026
from opentelemetry.instrumentation.distro import BaseDistro, DefaultDistro
27+
from opentelemetry.instrumentation.environment_variables import (
28+
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS,
29+
)
3130

3231
logger = getLogger(__file__)
3332

opentelemetry-instrumentation/tests/test_distro.py

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
# type: ignore
15-
# pylint: disable=no-name-in-module
1615

1716
from unittest import TestCase
1817

opentelemetry-instrumentation/tests/test_run.py

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
# type: ignore
15-
# pylint: disable=no-name-in-module
1615

1716
from os import environ, getcwd
1817
from os.path import abspath, dirname, pathsep

opentelemetry-sdk/tests/conftest.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# pylint: disable=no-name-in-module
1514

1615
from os import environ
1716

opentelemetry-sdk/tests/test_configurator.py

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
# type: ignore
15-
# pylint: disable=no-name-in-module
1615

1716
from os import environ
1817
from unittest import TestCase

0 commit comments

Comments
 (0)