Skip to content

Commit 46e3150

Browse files
committed
Fix lint
1 parent 231765e commit 46e3150

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _clean_attribute(
120120

121121
def _clean_extended_attribute_value(
122122
value: types.AnyValue, max_len: Optional[int]
123-
) -> types.AnyValue:
123+
) -> types.AnyValue: # disable=too-many-branches
124124
# for primitive types just return the value and eventually shorten the string length
125125
if value is None or isinstance(value, _VALID_ATTR_VALUE_TYPES):
126126
if max_len is not None and isinstance(value, str):

opentelemetry-api/tests/attributes/test_attributes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,11 @@ def __str__(self):
311311

312312
bdict = BoundedAttributes(extended_attributes=True, immutable=False)
313313
wsgi_request = DummyWSGIRequest()
314-
original_request = wsgi_request # Keep reference to original object
315314

316315
with unittest.mock.patch(
317316
"opentelemetry.attributes._clean_extended_attribute",
318317
return_value="stringified_request",
319-
) as clean_extended_attribute_mock:
318+
):
320319
bdict["request"] = wsgi_request
321320

322321
# Verify that the request stored in the bounded dict matches the cleaned value

0 commit comments

Comments
 (0)