File tree 2 files changed +4
-4
lines changed
src/opentelemetry/attributes
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -181,10 +181,9 @@ def _clean_extended_attribute_value(
181
181
return tuple (cleaned_seq )
182
182
183
183
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 "
185
186
"sequence of those types" ,
186
- type (value ).__name__ ,
187
- [valid_type .__name__ for valid_type in _VALID_ANY_VALUE_TYPES ],
188
187
)
189
188
190
189
@@ -207,7 +206,7 @@ def _clean_extended_attribute(
207
206
try :
208
207
return _clean_extended_attribute_value (value , max_len = max_len )
209
208
except TypeError as exception :
210
- _logger .warning (f "Attribute { key } : { exception } " )
209
+ _logger .warning ("Attribute %s: %s" , key , exception )
211
210
return None
212
211
213
212
Original file line number Diff line number Diff line change @@ -291,6 +291,7 @@ def test_locking(self):
291
291
for num in range (100 ):
292
292
self .assertEqual (bdict [str (num )], num )
293
293
294
+ # pylint: disable=no-self-use
294
295
def test_extended_attributes (self ):
295
296
bdict = BoundedAttributes (extended_attributes = True , immutable = False )
296
297
with unittest .mock .patch (
You can’t perform that action at this time.
0 commit comments