A bit of linting.
authorIan Cordasco <graffatcolmingov@gmail.com>
Tue, 18 Dec 2012 01:19:11 +0000 (20:19 -0500)
committerIan Cordasco <graffatcolmingov@gmail.com>
Tue, 18 Dec 2012 01:19:11 +0000 (20:19 -0500)
Mostly removed a whole bunch of unused imports.

requests/adapters.py
requests/auth.py
requests/models.py
requests/utils.py

index dc18dee..f06dd47 100644 (file)
@@ -8,11 +8,9 @@ This module contains the transport adapters that Requests uses to define
 and maintain connections.
 """
 
-import os
 import socket
 
 from .models import Response
-from .auth import HTTPProxyAuth
 from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
 from .hooks import dispatch_hook
 from .compat import urlparse
@@ -83,7 +81,6 @@ class HTTPAdapter(BaseAdapter):
             else:
                 conn.cert_file = cert
 
-
     def build_response(self, req, resp):
         response = Response()
 
@@ -125,7 +122,6 @@ class HTTPAdapter(BaseAdapter):
 
         return conn
 
-
     def close(self):
         """Dispose of any internal state.
 
index 9d33e5f..277e601 100644 (file)
@@ -165,4 +165,4 @@ class HTTPDigestAuth(AuthBase):
         if self.last_nonce:
             r.headers['Authorization'] = self.build_digest_header(r.method, r.url)
         r.register_hook('response', self.handle_401)
-        return r
\ No newline at end of file
+        return r
index 372d7ce..a85ed25 100644 (file)
@@ -11,24 +11,21 @@ import collections
 import logging
 
 from io import BytesIO
-from .hooks import dispatch_hook, default_hooks
+from .hooks import default_hooks
 from .structures import CaseInsensitiveDict
 from .status_codes import codes
 
-from .auth import HTTPBasicAuth, HTTPProxyAuth
-from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header
+from .auth import HTTPBasicAuth
+from .cookies import cookiejar_from_dict, get_cookie_header
 from .packages.urllib3.filepost import encode_multipart_formdata
-from .exceptions import (
-    ConnectionError, HTTPError, RequestException, Timeout, TooManyRedirects,
-    URLRequired, SSLError, MissingSchema, InvalidSchema, InvalidURL)
+from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL
 from .utils import (
-    get_encoding_from_headers, stream_untransfer, guess_filename, requote_uri,
-    stream_decode_response_unicode, get_netrc_auth, get_environ_proxies,
-    to_key_val_list, DEFAULT_CA_BUNDLE_PATH, parse_header_links, iter_slices,
-    guess_json_utf)
+    stream_untransfer, guess_filename, requote_uri,
+    stream_decode_response_unicode, to_key_val_list, parse_header_links,
+    iter_slices, guess_json_utf)
 from .compat import (
-    cookielib, urlparse, urlunparse, urljoin, urlsplit, urlencode, str, bytes,
-    StringIO, is_py2, is_py3, chardet, json, builtin_str, urldefrag, basestring)
+    cookielib, urlparse, urlunparse, urlsplit, urlencode, str, bytes, StringIO,
+    is_py2, chardet, json, builtin_str, basestring)
 
 REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)
 CONTENT_CHUNK_SIZE = 10 * 1024
@@ -385,7 +382,6 @@ class Response(object):
         #: up here. The list is sorted from the oldest to the most recent request.
         self.history = []
 
-
         self.reason = None
 
         #: A CookieJar of Cookies the server sent back.
index fb098aa..c94bd6c 100644 (file)
@@ -20,7 +20,7 @@ from netrc import netrc, NetrcParseError
 
 from . import __version__
 from .compat import parse_http_list as _parse_list_header
-from .compat import quote, quote_plus, urlparse, basestring, bytes, str, OrderedDict
+from .compat import quote, urlparse, bytes, str, OrderedDict
 from .cookies import RequestsCookieJar, cookiejar_from_dict
 
 _hush_pyflakes = (RequestsCookieJar,)
@@ -254,7 +254,6 @@ def unquote_header_value(value, is_filename=False):
     return value
 
 
-
 def dict_from_cookiejar(cj):
     """Returns a key/value dictionary from a CookieJar.