Skip to content
Myr

PEP8 Cleanup

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Idan Gazit · committed by Idan Gazit · parent a189c23 · Browse files · 1 file+6 added−10 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+6 added−10 removed

  • other:+6 added−10 removed

1 file+6 added−10 removed

modified:requests/models.py+6 added-10 removed
107 unmodified lines
108109 # If no proxies are given, allow configuration by environment variables110 # HTTP_PROXY and HTTPS_PROXY.111 if not self.proxies and self.config.get('trust_env'):112 if 'HTTP_PROXY' in os.environ:113 self.proxies['http'] = os.environ['HTTP_PROXY']114 if 'HTTPS_PROXY' in os.environ:115 self.proxies['https'] = os.environ['HTTPS_PROXY']112 if 'HTTP_PROXY' in os.environ:113 self.proxies['http'] = os.environ['HTTP_PROXY']114 if 'HTTPS_PROXY' in os.environ:115 self.proxies['https'] = os.environ['HTTPS_PROXY']116117 self.data, self._enc_data = self._encode_params(data)118 self.params, self._enc_params = self._encode_params(params)119 self.files, self._enc_files = self._encode_files(files)
223 unmodified lines
343 return result, urlencode(result, doseq=True)344 else:345 return data, data346347 def _encode_files(self,files):347 def _encode_files(self, files):348349 if (not files) or isinstance(self.data, str):350 return None, None351
37 unmodified lines
389390 if not path:391 path = '/'392393393 if is_py2:394 if isinstance(scheme, str):395 scheme = scheme.encode('utf-8')396 if isinstance(netloc, str):
49 unmodified lines
446 """Properly register a hook."""447448 self.hooks[event].append(hook)449451 def deregister_hook(self,event,hook):450 def deregister_hook(self, event, hook):451 """Deregister a previously registered hook.452 Returns True if the hook existed, False if not.453 """454
57 unmodified lines
512 # Add content-type if it wasn't explicitly provided.513 if (content_type) and (not 'content-type' in self.headers):514 self.headers['Content-Type'] = content_type515517516 _p = urlparse(url)517 proxy = self.proxies.get(_p.scheme)518519 if proxy:
277 unmodified lines
797 # Trust that chardet isn't available or something went terribly wrong.798 except Exception:799 pass800803801 @property802 def text(self):803 """Content of the response, in unicode.804
38 unmodified lines
843 http_error = HTTPError('%s Client Error' % self.status_code)844 http_error.response = self845 raise http_error846850847 elif (self.status_code >= 500) and (self.status_code < 600):848 http_error = HTTPError('%s Server Error' % self.status_code)849 http_error.response = self850 raise http_error