From 4f64938ff02438bf6b1e379371f5182d48397c32 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 22 Jul 2013 17:14:37 +0900 Subject: [PATCH] Fix a few warnings flagged by PyDev - Unused import of urlparse - Unnecessary definition of variable - Incorrect indentation --- requests/models.py | 3 +-- requests/structures.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/requests/models.py b/requests/models.py index 3672b377..667b001f 100644 --- a/requests/models.py +++ b/requests/models.py @@ -25,7 +25,7 @@ from .utils import ( stream_decode_response_unicode, to_key_val_list, parse_header_links, iter_slices, guess_json_utf, super_len) from .compat import ( - cookielib, urlparse, urlunparse, urlsplit, urlencode, str, bytes, StringIO, + cookielib, urlunparse, urlsplit, urlencode, str, bytes, StringIO, is_py2, chardet, json, builtin_str, basestring) CONTENT_CHUNK_SIZE = 10 * 1024 @@ -352,7 +352,6 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): body = None content_type = None length = None - is_stream = False is_stream = all([ hasattr(data, '__iter__'), diff --git a/requests/structures.py b/requests/structures.py index 8d02ea67..a1759137 100644 --- a/requests/structures.py +++ b/requests/structures.py @@ -103,7 +103,7 @@ class CaseInsensitiveDict(collections.MutableMapping): # Copy is required def copy(self): - return CaseInsensitiveDict(self._store.values()) + return CaseInsensitiveDict(self._store.values()) def __repr__(self): return '%s(%r)' % (self.__class__.__name__, dict(self.items()))