mirror of
https://github.com/httpie/cli.git
synced 2024-11-21 23:33:12 +01:00
Cleanup (#993)
This commit is contained in:
parent
2409077a6d
commit
9883a46575
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
]
|
||||
|
1
setup.py
1
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 = [
|
||||
|
@ -5,7 +5,6 @@ from urllib.request import urlopen
|
||||
|
||||
import pytest
|
||||
import mock
|
||||
import requests
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
|
||||
from httpie.downloads import (
|
||||
|
@ -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"}}}'
|
||||
|
Loading…
Reference in New Issue
Block a user