[Python-modules-commits] [python-social-auth] 75/131: PEP8

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:17:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag v0.2.20
in repository python-social-auth.

commit 4e2d69b4643f1ce09cca880a007f16c6027b299e
Author: Matías Aguirre <matiasaguirre at gmail.com>
Date:   Sun Jul 17 03:52:46 2016 -0300

    PEP8
---
 docs/backends/line.rst  |  2 +-
 social/backends/line.py | 14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/docs/backends/line.rst b/docs/backends/line.rst
index 93fc479..f63c611 100644
--- a/docs/backends/line.rst
+++ b/docs/backends/line.rst
@@ -1,5 +1,5 @@
 Line.me
-==========
+=======
 
 Fill App Id and Secret in your project settings::
 
diff --git a/social/backends/line.py b/social/backends/line.py
index 347d52e..ba8136e 100644
--- a/social/backends/line.py
+++ b/social/backends/line.py
@@ -25,16 +25,19 @@ class LineOAuth2(BaseOAuth2):
 
     def auth_params(self, state=None):
         client_id, client_secret = self.get_key_and_secret()
-        params = {
+        return {
             'client_id': client_id,
             'redirect_uri': self.get_redirect_uri(),
             'response_type': self.RESPONSE_TYPE
         }
-        return params
 
     def process_error(self, data):
-        error_code = data.get('errorCode') or data.get('statusCode') or data.get('error')
-        error_message = data.get('errorMessage') or data.get('statusMessage') or data.get('error_desciption')
+        error_code = data.get('errorCode') or \
+                     data.get('statusCode') or \
+                     data.get('error')
+        error_message = data.get('errorMessage') or \
+                        data.get('statusMessage') or \
+                        data.get('error_desciption')
         if error_code is not None or error_message is not None:
             raise AuthFailed(self, error_message or error_code)
 
@@ -57,7 +60,8 @@ class LineOAuth2(BaseOAuth2):
             )
             self.process_error(response)
 
-            return self.do_auth(response['accessToken'], response=response, *args, **kwargs)
+            return self.do_auth(response['accessToken'], response=response,
+                                *args, **kwargs)
         except requests.HTTPError as err:
             self.process_error(json.loads(err.response.content))
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git



More information about the Python-modules-commits mailing list