File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/opentelemetry/attributes Expand file tree Collapse file tree 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(
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
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments