From b66838e48da243a7fefa7275044f6b5833ec1476 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Thu, 20 Aug 2015 16:18:42 -0700 Subject: [PATCH] Making all tox tests pass after pep8 fix. Covers a few unexplained dedents (pep8ify missed them) and an accidental use of b'.'. --- oauth2client/client.py | 4 ++-- oauth2client/locked_file.py | 4 ++-- tests/test_oauth2client.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/oauth2client/client.py b/oauth2client/client.py index 5ae9fee..3582990 100644 --- a/oauth2client/client.py +++ b/oauth2client/client.py @@ -708,8 +708,8 @@ class OAuth2Credentials(Credentials): token_response=data.get('token_response', None), scopes=data.get('scopes', None), token_info_uri=data.get('token_info_uri', None)) - retval.invalid = data['invalid'] - return retval + retval.invalid = data['invalid'] + return retval @property def access_token_expired(self): diff --git a/oauth2client/locked_file.py b/oauth2client/locked_file.py index ba9cdb9..1028a7e 100644 --- a/oauth2client/locked_file.py +++ b/oauth2client/locked_file.py @@ -136,8 +136,8 @@ class _PosixOpener(_Opener): return lock_filename = self._posix_lockfile(self._filename) - start_time = time.time() - while True: + start_time = time.time() + while True: try: self._lock_fd = os.open(lock_filename, os.O_CREAT | os.O_EXCL | os.O_RDWR) diff --git a/tests/test_oauth2client.py b/tests/test_oauth2client.py index 713fa61..d59a552 100644 --- a/tests/test_oauth2client.py +++ b/tests/test_oauth2client.py @@ -1096,7 +1096,7 @@ class OAuth2WebServerFlowTest(unittest.TestCase): try: credentials = self.flow.step2_exchange('some random code', http=http) - self.fail('should raise exception if exchange doesn\'t get 200') + self.fail('should raise exception if exchange doesn\'t get 200') except FlowExchangeError: pass @@ -1273,7 +1273,7 @@ class OAuth2WebServerFlowTest(unittest.TestCase): payload = (b'{' b' "access_token":"SlAV32hkKG",' b' "refresh_token":"8xLOxBtZp8",' - b' "id_token": "' + jwt + '"' + b' "id_token": "' + jwt + b'"' b'}') http = HttpMockSequence([({'status': '200'}, payload)]) credentials = self.flow.step2_exchange('some random code', http=http)