Skip to content

Commit c5c339d

Browse files
committed
fix(ci): rename pylint-disallowed test field, add changelog fragment
pylint's disallowed-name check rejected the field name "bar" in test_configuration_can_be_overridden. Also adds the missing .changelog/4766.added fragment required by the changelog check.
1 parent 5acab91 commit c5c339d

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.changelog/4766.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`opentelemetry-instrumentation`: add `configuration` opt-in attribute on `BaseInstrumentor` for declarative-config validation, and set it on `URLLib3Instrumentor` via `URLLib3InstrumentorConfig`

opentelemetry-instrumentation/tests/test_instrumentor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def test_configuration_defaults_to_none(self):
5252

5353
def test_configuration_can_be_overridden(self):
5454
@dataclass
55-
class FooConfig:
56-
bar: str | None = None
55+
class SampleConfig:
56+
excluded_urls: str | None = None
5757

5858
class ConfiguredInstrumentor(self.Instrumentor):
59-
configuration = FooConfig
59+
configuration = SampleConfig
6060

61-
self.assertIs(ConfiguredInstrumentor.configuration, FooConfig)
61+
self.assertIs(ConfiguredInstrumentor.configuration, SampleConfig)
6262
self.assertIsNone(self.Instrumentor.configuration)
6363

6464
@patch("opentelemetry.instrumentation.instrumentor._LOG")

0 commit comments

Comments
 (0)