Skip to content

Commit c946853

Browse files
committed
reference follow-up issue #5268 for ClassVar/instance-attribute mismatch
Adds a docstring note pointing to #5268 which tracks reviewing the generated additional_properties typing for stricter type checks. Assisted-by: Claude Opus 4.6
1 parent 76e940d commit c946853

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • opentelemetry-sdk/src/opentelemetry/sdk/_configuration

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ class _ComponentConfig(Protocol):
8080
Values in ``additional_properties`` are nested config dicts (suitable
8181
for ``**kwargs`` splatting to the user-defined component class) or
8282
``None`` (when the YAML uses ``my_plugin:`` or ``my_plugin: null``).
83+
84+
Note: the generated models declare ``additional_properties`` as a
85+
``ClassVar`` even though the decorator assigns it as an instance
86+
attribute at runtime. This is tolerated by pyright in ``standard``
87+
mode but flagged in ``strict`` mode. See #5268.
8388
"""
8489

8590
additional_properties: dict[str, dict[str, Any] | None]

0 commit comments

Comments
 (0)