Skip to content

Commit e215e93

Browse files
committed
Please lint
1 parent 6189f89 commit e215e93

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ def _clean_extended_attribute_value(
181181
return tuple(cleaned_seq)
182182

183183
raise TypeError(
184-
"Invalid type %s for attribute value. Expected one of %s or a "
184+
f"Invalid type {type(value).__name__} for attribute value. "
185+
f"Expected one of {[valid_type.__name__ for valid_type in _VALID_ANY_VALUE_TYPES]} or a "
185186
"sequence of those types",
186-
type(value).__name__,
187-
[valid_type.__name__ for valid_type in _VALID_ANY_VALUE_TYPES],
188187
)
189188

190189

@@ -207,7 +206,7 @@ def _clean_extended_attribute(
207206
try:
208207
return _clean_extended_attribute_value(value, max_len=max_len)
209208
except TypeError as exception:
210-
_logger.warning(f"Attribute {key}: {exception}")
209+
_logger.warning("Attribute %s: %s", key, exception)
211210
return None
212211

213212

opentelemetry-api/tests/attributes/test_attributes.py

+1
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def test_locking(self):
291291
for num in range(100):
292292
self.assertEqual(bdict[str(num)], num)
293293

294+
# pylint: disable=no-self-use
294295
def test_extended_attributes(self):
295296
bdict = BoundedAttributes(extended_attributes=True, immutable=False)
296297
with unittest.mock.patch(

0 commit comments

Comments
 (0)