Style guide: used isinstance()

This commit is contained in:
chrysle 2023-02-02 17:03:46 +01:00
parent b16392fbb9
commit a1c1d0d896
2 changed files with 2 additions and 2 deletions

View File

@ -293,6 +293,6 @@ def decode_raw_args(
"""
return [
arg.decode(stdin_encoding)
if type(arg) is bytes else arg
if isinstance(arg, bytes) else arg
for arg in args
]

View File

@ -204,7 +204,7 @@ class Session(BaseConfigDict):
continue # Ignore explicitly unset headers
original_value = value
if type(value) is not str:
if not isinstance(value, str):
value = value.decode()
if name.lower() == 'user-agent' and value.startswith('HTTPie/'):