From a1c1d0d896944c539699ca0250158b8e333cb8e7 Mon Sep 17 00:00:00 2001 From: chrysle Date: Thu, 2 Feb 2023 17:03:46 +0100 Subject: [PATCH] Style guide: used isinstance() --- httpie/core.py | 2 +- httpie/sessions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httpie/core.py b/httpie/core.py index d0c26dcb..ca2cd141 100644 --- a/httpie/core.py +++ b/httpie/core.py @@ -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 ] diff --git a/httpie/sessions.py b/httpie/sessions.py index 99dcdba9..fddd35c2 100644 --- a/httpie/sessions.py +++ b/httpie/sessions.py @@ -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/'):