diff options
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/basetypes.py | 1 | ||||
-rw-r--r-- | netlib/http/headers.py | 2 | ||||
-rw-r--r-- | netlib/http/url.py | 1 | ||||
-rw-r--r-- | netlib/human.py | 2 | ||||
-rw-r--r-- | netlib/utils.py | 1 |
5 files changed, 5 insertions, 2 deletions
diff --git a/netlib/basetypes.py b/netlib/basetypes.py index d03246ff..9d6c60ba 100644 --- a/netlib/basetypes.py +++ b/netlib/basetypes.py @@ -1,6 +1,7 @@ import six import abc + @six.add_metaclass(abc.ABCMeta) class Serializable(object): """ diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 8f669ec1..fa7b7180 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -176,7 +176,7 @@ class Headers(MultiDict): self.fields = fields return replacements - + def parse_content_type(c): """ A simple parser for content-type values. Returns a (type, subtype, diff --git a/netlib/http/url.py b/netlib/http/url.py index 147ed572..8ce28578 100644 --- a/netlib/http/url.py +++ b/netlib/http/url.py @@ -3,6 +3,7 @@ from six.moves import urllib from .. import utils + # PY2 workaround def decode_parse_result(result, enc): if hasattr(result, "decode"): diff --git a/netlib/human.py b/netlib/human.py index 9eccd35b..a007adc7 100644 --- a/netlib/human.py +++ b/netlib/human.py @@ -19,7 +19,7 @@ def pretty_size(size): if x == int(x): x = int(x) return str(x) + suf - return "%s%s"%(size, SIZE_TABLE[0][0]) + return "%s%s" % (size, SIZE_TABLE[0][0]) def parse_size(s): diff --git a/netlib/utils.py b/netlib/utils.py index 6be1c17f..b8408d1d 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -8,6 +8,7 @@ import inspect import six + def always_bytes(unicode_or_bytes, *encode_args): if isinstance(unicode_or_bytes, six.text_type): return unicode_or_bytes.encode(*encode_args) |