cleaning up line lengths
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Kenneth Reitz · committed by Kenneth Reitz · parent f4c4bf3 · Browse files · 1 file·+17 added−9 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+17 added−9 removed
- other:+17 added−9 removed
Provenance
- Commit
015d6b7- Tree
4b1348b- Author
Kenneth Reitz <me@kennethreitz.com>- Committer
Kenneth Reitz <me@kennethreitz.com>- Parent
f4c4bf3
1 file changed+17 added−9 removed
modified:requests/core.py+17 added-9 removed
48 unmodified lines49 """Hidden wrapper around the urllib2.Request object. Allows for manual50 setting of HTTP methods.51 """52 53- def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=False, method=None):54- urllib2.Request.__init__( self, url, data, headers, origin_req_host, unverifiable)53+ def __init__(self, url, data=None, headers={}, origin_req_host=None,54+ unverifiable=False, method=None):55+ urllib2.Request.__init__(self, url, data, headers, origin_req_host, unverifiable)56 self.method = method57 58 def get_method(self):59 if self.method:8 unmodified lines68 """69 70 _METHODS = ('GET', 'HEAD', 'PUT', 'POST', 'DELETE')71 71- def __init__(self, url=None, headers=dict(), files=None, method=None, params=dict(), data=dict(), auth=None, cookiejar=None):72+ def __init__(self, url=None, headers=dict(), files=None, method=None,73+ params=dict(), data=dict(), auth=None, cookiejar=None):74 self.url = url75 self.headers = headers76 self.files = files77 self.method = method226 unmodified lines304 :param cookies: (optional) CookieJar object to send with the :class:`Request`.305 :param auth: (optional) AuthObject to enable Basic HTTP Auth.306 """307 306- r = Request(method='GET', url=url, params=params, headers=headers, cookiejar=cookies, auth=_detect_auth(url, auth))308+ r = Request(method='GET', url=url, params=params, headers=headers,309+ cookiejar=cookies, auth=_detect_auth(url, auth))310 r.send()311 312 return r.response313 6 unmodified lines320 :param headers: (optional) Dictionary of HTTP Headers to sent with the :class:`Request`.321 :param cookies: (optional) CookieJar object to send with the :class:`Request`.322 :param auth: (optional) AuthObject to enable Basic HTTP Auth.323 """321- r = Request(method='HEAD', url=url, params=params, headers=headers, cookiejar=cookies, auth=_detect_auth(url, auth))324+ r = Request(method='HEAD', url=url, params=params, headers=headers,325+ cookiejar=cookies, auth=_detect_auth(url, auth))326 r.send()327 328 return r.response329 8 unmodified lines338 :param cookies: (optional) CookieJar object to send with the :class:`Request`.339 :param auth: (optional) AuthObject to enable Basic HTTP Auth.340 """341 338- r = Request(method='POST', url=url, data=data, headers=headers, files=files, cookiejar=cookies, auth=_detect_auth(url, auth))342+ r = Request(method='POST', url=url, data=data, headers=headers,343+ files=files, cookiejar=cookies, auth=_detect_auth(url, auth))344 r.send()345 346 return r.response347 8 unmodified lines356 :param cookies: (optional) CookieJar object to send with the :class:`Request`.357 :param auth: (optional) AuthObject to enable Basic HTTP Auth.358 """359 355- r = Request(method='PUT', url=url, data=data, headers=headers, files=files, cookiejar=cookies, auth=_detect_auth(url, auth)) 360+ r = Request(method='PUT', url=url, data=data, headers=headers, files=files,361+ cookiejar=cookies, auth=_detect_auth(url, auth))362 r.send()363 364 return r.response365 7 unmodified lines373 :param cookies: (optional) CookieJar object to send with the :class:`Request`.374 :param auth: (optional) AuthObject to enable Basic HTTP Auth.375 """376 371- r = Request(method='DELETE', url=url, params=params, headers=headers, cookiejar=cookies, auth=_detect_auth(url, auth))377+ r = Request(method='DELETE', url=url, params=params, headers=headers,378+ cookiejar=cookies, auth=_detect_auth(url, auth))379 r.send()380 381 return r.response382 37 unmodified lines420 return None421 422 423 class RequestException(Exception):417- """There was an ambiguous exception that occured while handling your request."""424+ """There was an ambiguous exception that occured while handling your425+ request."""426 427 class AuthenticationError(RequestException):428 """The authentication credentials provided were invalid."""429 5 unmodified lines