[Python-modules-commits] [python-social-auth] 102/131: Code style and PEP8

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:17:08 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 3cb8bd557fd94f3d261471044506f2e2a69bceec
Author: Matías Aguirre <matiasaguirre at gmail.com>
Date:   Sat Aug 6 04:22:36 2016 -0300

    Code style and PEP8
---
 social/actions.py | 10 +++++-----
 social/utils.py   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/social/actions.py b/social/actions.py
index 0973219..af61bd7 100644
--- a/social/actions.py
+++ b/social/actions.py
@@ -19,8 +19,8 @@ def do_auth(backend, redirect_name='next'):
         # Check and sanitize a user-defined GET/POST next field value
         redirect_uri = data[redirect_name]
         if backend.setting('SANITIZE_REDIRECTS', True):
-            allowed_hosts = backend.setting('ALLOWED_REDIRECT_HOSTS', []) + [
-                backend.strategy.request_host()]
+            allowed_hosts = backend.setting('ALLOWED_REDIRECT_HOSTS', []) + \
+                            [backend.strategy.request_host()]
             redirect_uri = sanitize_redirect(allowed_hosts, redirect_uri)
         backend.strategy.session_set(
             redirect_name,
@@ -92,10 +92,10 @@ def do_complete(backend, login, user=None, redirect_name='next',
                '{0}={1}'.format(redirect_name, redirect_value)
 
     if backend.setting('SANITIZE_REDIRECTS', True):
-        allowed_hosts = backend.setting('ALLOWED_REDIRECT_HOSTS', []) + [
-            backend.strategy.request_host()]
+        allowed_hosts = backend.setting('ALLOWED_REDIRECT_HOSTS', []) + \
+                        [backend.strategy.request_host()]
         url = sanitize_redirect(allowed_hosts, url) or \
-            backend.setting('LOGIN_REDIRECT_URL')
+              backend.setting('LOGIN_REDIRECT_URL')
     return backend.strategy.redirect(url)
 
 
diff --git a/social/utils.py b/social/utils.py
index c70db52..e82af69 100644
--- a/social/utils.py
+++ b/social/utils.py
@@ -90,7 +90,7 @@ def sanitize_redirect(hosts, redirect_to):
     """
     if redirect_to:
         try:
-            # Don't redirect to a host not in a list
+            # Don't redirect to a host that's not in the list
             netloc = urlparse(redirect_to)[1] or hosts[0]
         except (TypeError, AttributeError):
             pass

-- 
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