Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ persistent=yes

# When enabled, pylint would attempt to guess common misconfiguration and emit
Comment thread
xrmx marked this conversation as resolved.
Outdated
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

Comment thread
xrmx marked this conversation as resolved.
Outdated

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
Expand Down Expand Up @@ -463,6 +463,9 @@ valid-metaclass-classmethod-first-arg=cls
# Maximum number of arguments for function / method.
max-args=5

# Maximum number of positional arguments for function / method.
max-positional-arguments=10
Comment thread
xrmx marked this conversation as resolved.
Outdated

# Maximum number of attributes for a class (see R0902).
max-attributes=7

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#4220](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4220))

### Fixed

Comment thread
xrmx marked this conversation as resolved.
- Bump `pylint` to `4.0.5` to fix false-positive `no-name-in-module` errors for `concurrent.futures` imports on Python 3.14, and remove deprecated `suggestion-mode` option from `.pylintrc`.
Comment thread
xrmx marked this conversation as resolved.
Outdated
([#4244](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4244))
- `opentelemetry-instrumentation-flask`: Align `http.server.active_requests` initialization with semantic convention helpers to ensure consistent names, units, and descriptions.
([#4094](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4094))
- `opentelemetry-instrumentation-asyncio`: Fix environment variables not appearing in Read the Docs documentation
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pylint==3.0.2
pylint==4.0.5
httpretty==1.1.4
pyright==v1.1.404
sphinx==7.1.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ class OpenTelemetryMiddleware:
exclude_spans: Optionally exclude HTTP `send` and/or `receive` spans from the trace.
"""

# pylint: disable=too-many-branches
# pylint: disable=too-many-branches,too-many-positional-arguments
def __init__(
self,
app,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# limitations under the License.
import asyncio
import threading
from concurrent.futures import ( # pylint: disable=no-name-in-module; TODO #4199
ThreadPoolExecutor,
)
from concurrent.futures import ThreadPoolExecutor
from unittest.mock import patch

# pylint: disable=no-name-in-module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def assert_equal_or_not_present(value, attribute_name, span):
assert attribute_name not in span.attributes, attribute_name


# pylint: disable=too-many-positional-arguments
def assert_all_attributes(
span: ReadableSpan,
request_model: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def trace_integration(
)


# pylint: disable=too-many-positional-arguments
def wrap_connect(
name: str,
connect_module: Callable[..., Any],
Expand Down Expand Up @@ -339,6 +340,7 @@ def unwrap_connect(
unwrap(connect_module, connect_method_name)


# pylint: disable=too-many-positional-arguments
def instrument_connection(
name: str,
connection: ConnectionT | TracedConnectionProxy[ConnectionT],
Expand Down Expand Up @@ -420,6 +422,7 @@ def uninstrument_connection(


class DatabaseApiIntegration:
# pylint: disable=too-many-positional-arguments
def __init__(
self,
name: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def instrument_app(
http_capture_headers_server_response: list[str] | None = None,
http_capture_headers_sanitize_fields: list[str] | None = None,
exclude_spans: list[Literal["receive", "send"]] | None = None,
): # pylint: disable=too-many-locals
): # pylint: disable=too-many-locals,too-many-positional-arguments
"""Instrument an uninstrumented FastAPI application.

Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ def _uninstrument(self, **kwargs: typing.Any):
unwrap(httpx.AsyncHTTPTransport, "handle_async_request")

@staticmethod
def _handle_request_wrapper( # pylint: disable=too-many-locals
def _handle_request_wrapper( # pylint: disable=too-many-locals,too-many-positional-arguments
wrapped: typing.Callable[..., typing.Any],
instance: httpx.HTTPTransport,
args: tuple[typing.Any, ...],
Expand Down Expand Up @@ -1351,7 +1351,7 @@ def _handle_request_wrapper( # pylint: disable=too-many-locals
return response

@staticmethod
async def _handle_async_request_wrapper( # pylint: disable=too-many-locals
async def _handle_async_request_wrapper( # pylint: disable=too-many-locals,too-many-positional-arguments
wrapped: typing.Callable[..., typing.Awaitable[typing.Any]],
instance: httpx.AsyncHTTPTransport,
args: tuple[typing.Any, ...],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from __future__ import annotations

import threading
from concurrent.futures import ( # pylint: disable=no-name-in-module; TODO #4199
from concurrent.futures import (
Future,
ThreadPoolExecutor,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _normalize_request(args, kwargs):
return (new_args, new_kwargs)


def fetch_async( # pylint: disable=too-many-locals
def fetch_async( # pylint: disable=too-many-locals,too-many-positional-arguments
tracer,
request_hook,
response_hook,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def _get_span_name(method: str) -> str:
return method


# pylint: disable=too-many-locals
# pylint: disable=too-many-locals,too-many-positional-arguments
def _instrument(
tracer: Tracer,
duration_histogram_old: Histogram,
Expand Down Expand Up @@ -687,6 +687,7 @@ def _filter_attributes_semconv(
return (duration_attrs_old, duration_attrs_new)


# pylint: disable=too-many-positional-arguments
def _record_metrics(
metric_attributes: dict,
duration_histogram_old: Histogram,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


# Disable snake_case naming style so this class can match the sampling rules response from X-Ray
# pylint: disable=invalid-name
# pylint: disable=invalid-name,too-many-positional-arguments
class _SamplingRule:
def __init__(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import posixpath
import threading
from collections import OrderedDict
from concurrent.futures import ( # pylint: disable=no-name-in-module; TODO #4199
from concurrent.futures import (
Future,
ThreadPoolExecutor,
)
Expand Down
Loading