From 582b8eab51e6e4cf5db727e5b80e91e672e3dab3 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Wed, 23 Apr 2014 21:24:12 -1000 Subject: [PATCH] pep8 --- vcr/stubs/__init__.py | 3 ++- vcr/stubs/compat.py | 2 +- vcr/stubs/httplib2_stubs.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py index 07f8660..e8e6843 100644 --- a/vcr/stubs/__init__.py +++ b/vcr/stubs/__init__.py @@ -16,6 +16,7 @@ from vcr.request import Request from vcr.errors import CannotOverwriteExistingCassetteException from . import compat + class VCRFakeSocket(object): """ A socket that doesn't do anything! @@ -35,7 +36,7 @@ class VCRFakeSocket(object): this descriptor and make sure it's not closed. Return file descriptor 0 since that's stdin. """ - return 0 # wonder how bad this is.... + return 0 # wonder how bad this is.... def parse_headers_backwards_compat(header_dict): diff --git a/vcr/stubs/compat.py b/vcr/stubs/compat.py index d400044..3b383e5 100644 --- a/vcr/stubs/compat.py +++ b/vcr/stubs/compat.py @@ -31,7 +31,7 @@ def get_headers(response): if six.PY3: header_list = response.msg._headers return [b': '.join((k.encode('utf-8'), v.encode('utf-8'))) + b'\r\n' - for k, v in header_list] + for k, v in header_list] else: return response.msg.headers diff --git a/vcr/stubs/httplib2_stubs.py b/vcr/stubs/httplib2_stubs.py index fafa37f..04b508b 100644 --- a/vcr/stubs/httplib2_stubs.py +++ b/vcr/stubs/httplib2_stubs.py @@ -47,7 +47,7 @@ class VCRHTTPSConnectionWithTimeout(VCRHTTPSConnection, for kw in unknown_keys: del safe_kwargs[kw] self.proxy_info = kwargs.pop('proxy_info', None) - if not 'ca_certs' in kwargs or kwargs['ca_certs'] is None: + if 'ca_certs' not in kwargs or kwargs['ca_certs'] is None: try: import httplib2 self.ca_certs = httplib2.CA_CERTS