From: David Pursehouse Date: Mon, 22 Jul 2013 08:14:37 +0000 (+0900) Subject: Fix a few warnings flagged by PyDev X-Git-Tag: 2.0~13^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f64938ff02438bf6b1e379371f5182d48397c32;p=services%2Fpython-requests.git Fix a few warnings flagged by PyDev - Unused import of urlparse - Unnecessary definition of variable - Incorrect indentation --- diff --git a/requests/models.py b/requests/models.py index 3672b37..667b001 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 8d02ea6..a175913 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()))