From b729307ca08f12018bb9420574068acf636af462 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 10:14:30 +0000 Subject: [PATCH 1/2] chore(deps): update dependency pylint to v4 [security] --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index caa46ac0c4a..c96dbd33898 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,4 @@ -pylint==3.3.4 +pylint==4.0.9 griffe==1.15.0 httpretty==1.1.4 inline-snapshot==0.34.2 From 21664a1add06eb99ca62303ed6ef79d4e28bb4c3 Mon Sep 17 00:00:00 2001 From: Lukas Hering Date: Sun, 1 Nov 2026 22:58:13 -0500 Subject: [PATCH 2/2] Fix lint compatibility with Pylint 4 Remove the obsolete suggestion-mode option from both Pylint configs and use NoneType when unwrapping optional annotations. Assisted-by: GPT-6 --- .pylintrc | 4 ---- .../src/opentelemetry/configuration/_conversion.py | 4 ++-- opentelemetry-semantic-conventions/.pylintrc | 4 ---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.pylintrc b/.pylintrc index bda4148beb5..6ee96abff4d 100644 --- a/.pylintrc +++ b/.pylintrc @@ -36,10 +36,6 @@ persistent=yes # Specify a configuration file. #rcfile= -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. -suggestion-mode=yes - # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py b/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py index e5ceb0f59f5..dca1e14c805 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py @@ -14,7 +14,7 @@ from collections.abc import Mapping from dataclasses import MISSING, fields, is_dataclass from enum import Enum -from types import UnionType +from types import NoneType, UnionType from typing import Any, TypeVar, Union, get_args, get_origin, get_type_hints _T = TypeVar("_T") @@ -27,7 +27,7 @@ def _unwrap_optional(type_hint: Any) -> Any: """ origin = get_origin(type_hint) if origin is UnionType or origin is Union: - non_none = [t for t in get_args(type_hint) if t is not type(None)] + non_none = [t for t in get_args(type_hint) if t is not NoneType] if len(non_none) == 1: return non_none[0] return type_hint diff --git a/opentelemetry-semantic-conventions/.pylintrc b/opentelemetry-semantic-conventions/.pylintrc index b034d8c75ad..621216e432e 100644 --- a/opentelemetry-semantic-conventions/.pylintrc +++ b/opentelemetry-semantic-conventions/.pylintrc @@ -36,10 +36,6 @@ persistent=yes # Specify a configuration file. #rcfile= -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. -suggestion-mode=yes - # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no