From 213c4ee7d116b18f13be4df641d3536b3fa333c2 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 1 Aug 2017 10:26:33 -0500 Subject: [PATCH] fixed use of whitespaces --- gluon/authapi.py | 10 +++++----- gluon/newcron.py | 2 +- gluon/packages/dal | 2 +- gluon/sqlhtml.py | 8 ++++---- gluon/tools.py | 6 +++--- gluon/widget.py | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gluon/authapi.py b/gluon/authapi.py index f28f57a1..d0922384 100644 --- a/gluon/authapi.py +++ b/gluon/authapi.py @@ -20,10 +20,10 @@ DEFAULT = lambda: None class AuthAPI(object): """ AuthAPI is a barebones Auth implementation which does not have a concept of - HTML forms or redirects, emailing or even an URL, you are responsible for + HTML forms or redirects, emailing or even an URL, you are responsible for all that if you use it. The main Auth functions such as login, logout, register, profile are designed - in a Dict In -> Dict Out logic so, for instance, if you set + in a Dict In -> Dict Out logic so, for instance, if you set registration_requires_verification you are responsible for sending the key to the user and even rolling back the transaction if you can't do it. @@ -245,13 +245,13 @@ class AuthAPI(object): migrate = db._migrate if fake_migrate is None: fake_migrate = db._fake_migrate - + settings = self.settings if username is None: username = settings.use_username else: settings.use_username = username - + if not self.signature: self.define_signature() if signature is True: @@ -1012,7 +1012,7 @@ class AuthAPI(object): ): """ Verify a given registration_key actually exists in the user table. - Resets the key to empty string '' or 'pending' if + Resets the key to empty string '' or 'pending' if setttings.registration_requires_approval is true. Keyword Args: diff --git a/gluon/newcron.py b/gluon/newcron.py index d422f074..d53ecbe5 100644 --- a/gluon/newcron.py +++ b/gluon/newcron.py @@ -225,7 +225,7 @@ def parsecronline(line): params = line.strip().split(None, 6) if len(params) < 7: return None - daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3, + daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3, 'thu': 4, 'fri': 5, 'sat': 6} for (s, id) in zip(params[:5], ['min', 'hr', 'dom', 'mon', 'dow']): if not s in [None, '*']: diff --git a/gluon/packages/dal b/gluon/packages/dal index 6eece919..f66ad176 160000 --- a/gluon/packages/dal +++ b/gluon/packages/dal @@ -1 +1 @@ -Subproject commit 6eece9197148daf9e470036cc5ab1ad87ac57183 +Subproject commit f66ad176943f55d80a4e3f9f8cab659a3852c343 diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 810d1306..cb317e82 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -1922,8 +1922,8 @@ class SQLFORM(FORM): del attributes['table_name'] # Clone fields, while passing tables straight through - fields_with_clones = [f.clone() if isinstance(f, Field) else f for f in fields] - + fields_with_clones = [f.clone() if isinstance(f, Field) else f for f in fields] + return SQLFORM(DAL(None).define_table(table_name, *fields_with_clones), **attributes) @staticmethod @@ -3161,8 +3161,8 @@ class SQLFORM(FORM): # if isinstance(linked_tables, dict): # linked_tables = linked_tables.get(table._tablename, []) if linked_tables is None or referee in linked_tables: - field.represent = (lambda id, r=None, referee=referee, rep=field.represent: - A(callable(rep) and rep(id) or id, + field.represent = (lambda id, r=None, referee=referee, rep=field.represent: + A(callable(rep) and rep(id) or id, cid=request.cid, _href=url(args=['view', referee, id]))) except (KeyError, ValueError, TypeError): redirect(URL(args=table._tablename)) diff --git a/gluon/tools.py b/gluon/tools.py index 9e541112..0cf9b205 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -1792,7 +1792,7 @@ class Auth(AuthAPI): servicevalidate='serviceValidate', proxyvalidate='proxyValidate', logout='logout'), - cas_create_user=True, + cas_create_user=True, extra_fields={}, actions_disabled=[], controller=controller, @@ -2285,7 +2285,7 @@ class Auth(AuthAPI): If the user doesn't yet exist, then they are created. """ table_user = self.table_user() - create_user = self.settings.cas_create_user + create_user = self.settings.cas_create_user user = None checks = [] # make a guess about who this user is @@ -2318,7 +2318,7 @@ class Auth(AuthAPI): update_keys[key] = keys[key] user.update_record(**update_keys) elif checks: - if create_user is False: + if create_user is False: # Remove current open session a send message self.logout(next=None, onlogout=None, log=None) raise HTTP(403, "Forbidden. User need to be created first.") diff --git a/gluon/widget.py b/gluon/widget.py index 0804fa96..d56be20a 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -140,7 +140,7 @@ class web2pyDialog(object): else: import tkinter from tkinter import messagebox - + bg_color = 'white' root.withdraw() @@ -463,7 +463,7 @@ class web2pyDialog(object): import tkMessageBox as messagebox else: from tkinter import messagebox - + messagebox.showerror('web2py start server', message) def start(self):