summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShubhendra Singh Chauhan <withshubh@gmail.com>2020-12-21 16:33:25 +0530
committerGitHub <noreply@github.com>2020-12-21 12:03:25 +0100
commit9883a46575afc1eb6ac14c8580dcb8afba3fafdd (patch)
tree112db5e2b201c9b2d231deb4f33c0a7c3b3bad3a
parent2409077a6d1b74a735790460d03d709b56960ec5 (diff)
Cleanup (#993)
-rw-r--r--httpie/cli/constants.py9
-rw-r--r--httpie/cli/requestitems.py1
-rw-r--r--httpie/core.py2
-rw-r--r--setup.py1
-rw-r--r--tests/test_downloads.py1
-rw-r--r--tests/test_httpie.py2
6 files changed, 3 insertions, 13 deletions
diff --git a/httpie/cli/constants.py b/httpie/cli/constants.py
index 5b1d5986..e0690e02 100644
--- a/httpie/cli/constants.py
+++ b/httpie/cli/constants.py
@@ -5,15 +5,6 @@ import enum
import re
-# TODO: Use MultiDict for headers once added to `requests`.
-# <https://github.com/jakubroztocil/httpie/issues/130>
-
-
-# ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
-# <https://tools.ietf.org/html/rfc3986#section-3.1>
-from enum import Enum
-
-
URL_SCHEME_RE = re.compile(r'^[a-z][a-z0-9.+-]*://', re.IGNORECASE)
HTTP_POST = 'POST'
diff --git a/httpie/cli/requestitems.py b/httpie/cli/requestitems.py
index 3168c39c..e75e0395 100644
--- a/httpie/cli/requestitems.py
+++ b/httpie/cli/requestitems.py
@@ -1,5 +1,4 @@
import os
-from io import BytesIO
from typing import Callable, Dict, IO, List, Optional, Tuple, Union
from httpie.cli.argtypes import KeyValueArg
diff --git a/httpie/core.py b/httpie/core.py
index 5092c5ea..43b4255c 100644
--- a/httpie/core.py
+++ b/httpie/core.py
@@ -283,6 +283,6 @@ def decode_raw_args(
"""
return [
arg.decode(stdin_encoding)
- if type(arg) == bytes else arg
+ if type(arg) is bytes else arg
for arg in args
]
diff --git a/setup.py b/setup.py
index a10fd8d7..5204cadf 100644
--- a/setup.py
+++ b/setup.py
@@ -15,6 +15,7 @@ class PyTest(TestCommand):
and runs the tests with no fancy stuff like parallel execution.
"""
+
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = [
diff --git a/tests/test_downloads.py b/tests/test_downloads.py
index 381bd030..f32043b8 100644
--- a/tests/test_downloads.py
+++ b/tests/test_downloads.py
@@ -5,7 +5,6 @@ from urllib.request import urlopen
import pytest
import mock
-import requests
from requests.structures import CaseInsensitiveDict
from httpie.downloads import (
diff --git a/tests/test_httpie.py b/tests/test_httpie.py
index 877d5c84..5a297071 100644
--- a/tests/test_httpie.py
+++ b/tests/test_httpie.py
@@ -182,4 +182,4 @@ def test_json_input_preserve_order(httpbin_both):
'order:={"map":{"1":"first","2":"second"}}')
assert HTTP_OK in r
assert r.json['data'] == \
- '{"order": {"map": {"1": "first", "2": "second"}}}'
+ '{"order": {"map": {"1": "first", "2": "second"}}}'