mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 16:53:35 +01:00
Style guide: used isinstance()
This commit is contained in:
parent
b16392fbb9
commit
a1c1d0d896
@ -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
|
||||
]
|
||||
|
@ -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/'):
|
||||
|
Loading…
Reference in New Issue
Block a user