fixed minor pylint -E errors

This commit is contained in:
mdipierro
2017-07-02 01:55:51 -05:00
parent f657b42f65
commit 9ded289924
3 changed files with 10 additions and 9 deletions
+3 -3
View File
@@ -225,8 +225,8 @@ def parsecronline(line):
params = line.strip().split(None, 6)
if len(params) < 7:
return None
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3, 'thu': 4,
'fri': 5, 'sat': 6}
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, '*']:
task[id] = []
@@ -239,7 +239,7 @@ def parsecronline(line):
elif val.isdigit() or val == '-1':
task[id].append(int(val))
elif id == 'dow' and val[:3].lower() in daysofweek:
task[id].append(daysofweek(val[:3].lower()))
task[id].append(daysofweek[val[:3].lower()])
task['user'] = params[5]
task['cmd'] = params[6]
return task
+4 -5
View File
@@ -307,13 +307,13 @@ try:
except ImportError:
has_futures = False
class Future:
class Future(object):
pass
class ThreadPoolExecutor:
class ThreadPoolExecutor(object):
pass
class _WorkItem:
class _WorkItem(object):
pass
@@ -784,8 +784,7 @@ class Rocket(object):
the application developer. Please update your \
applications to no longer call rocket.stop(True)"
try:
import warnings
raise warnings.DeprecationWarning(msg)
raise DeprecationWarning(msg)
except ImportError:
raise RuntimeError(msg)
+3 -1
View File
@@ -3152,7 +3152,9 @@ 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, cid=request.cid, _href=url(args=['view', referee, 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))
if nargs == len(args) + 1: