Skip to content

Commit d2529f3

Browse files
committed
chore: lint - replace l -> issues and sort imports
1 parent 94b7124 commit d2529f3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

scripts/roundup-reminder

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ TODO: possibly make this more general and configurable...
2828
'''
2929

3030
from __future__ import print_function
31+
3132
import sys
3233
from email.mime.multipart import MIMEMultipart
3334
from email.utils import make_msgid
34-
from roundup import instance, date
35+
36+
from roundup import date, instance
3537
from roundup.mailer import Mailer
3638

3739
# open the instance
@@ -80,17 +82,17 @@ for user_id in db.user.list():
8082
continue
8183

8284
# extract this user's issues
83-
l = []
85+
issues = []
8486
for issue_id in db.issue.find(assignedto=user_id):
8587
if db.issue.get(issue_id, 'status') == resolved_id:
8688
continue
8789
order = db.priority.get(db.issue.get(issue_id, 'priority'), 'order')
88-
l.append((order, db.issue.get(issue_id, 'activity'),
90+
issues.append((order, db.issue.get(issue_id, 'activity'),
8991
db.issue.get(issue_id, 'creation'), issue_id))
9092

9193
# sort the issues by timeliness and creation date
92-
l.sort(key=listKey)
93-
if not l:
94+
issues.sort(key=listKey)
95+
if not issues:
9496
continue
9597

9698
# generate the email message
@@ -110,7 +112,7 @@ for user_id in db.user.list():
110112
text_lines.append('='*75)
111113
# '2 months 213 immediate cc_daemon barfage
112114
old_priority = None
113-
for priority_order, activity_date, creation_date, issue_id in l:
115+
for _priority_order, activity_date, creation_date, issue_id in issues:
114116
priority = db.issue.get(issue_id, 'priority')
115117
if (priority != old_priority):
116118
old_priority = priority
@@ -151,7 +153,7 @@ and click on "My Issues". Do NOT respond to this message.
151153
<tr><th>Created</th> <th>ID</th> <th>Activity</th> <th>Title</th></tr>
152154
''')
153155
old_priority = None
154-
for priority_order, activity_date, creation_date, issue_id in l:
156+
for _priority_order, activity_date, creation_date, issue_id in issues:
155157
priority = db.issue.get(issue_id,'priority')
156158
if (priority != old_priority):
157159
old_priority = priority

0 commit comments

Comments
 (0)