File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def _normalized_exception_text(exc: Exception) -> str:
6868
6969
7070def _coerce_operation_name_component (value : object , * , fallback : str ) -> str :
71- if isinstance ( value , str ) and type (value ) is str :
71+ if type (value ) is str :
7272 return value
7373 try :
7474 normalized_value = str (value )
@@ -159,8 +159,7 @@ def _validate_operation_name(operation_name: str) -> None:
159159 )
160160 try :
161161 contains_control_character = any (
162- ord (character ) < 32 or ord (character ) == 127
163- for character in operation_name
162+ ord (character ) < 32 or ord (character ) == 127 for character in operation_name
164163 )
165164 except HyperbrowserError :
166165 raise
@@ -389,8 +388,10 @@ def _normalize_status_code_for_retry(status_code: object) -> Optional[int]:
389388 status_text = _decode_ascii_bytes_like (status_code )
390389 elif isinstance (status_code , (bytes , bytearray )):
391390 status_text = _decode_ascii_bytes_like (status_code )
392- elif isinstance (status_code , str ) :
391+ elif type (status_code ) is str :
393392 status_text = status_code
393+ elif isinstance (status_code , str ):
394+ status_text = None
394395 else :
395396 status_text = _decode_ascii_bytes_like (status_code )
396397
You can’t perform that action at this time.
0 commit comments