Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
extend-ignore = E501, W504, W503, E126
2 changes: 1 addition & 1 deletion denis/initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# is the situation where there are fewer than 3 students total and it is
# impossible to have any triplets. In that case we can form two pairs,
# one singleton, or the empty list which is why we have min(len, 3)
reviews = [[students_who_submitted[i+j]
reviews = [[students_who_submitted[i + j]
for j in range(-min(len(students_who_submitted), 3), 0)]
for i in range(len(students_who_submitted))]

Expand Down
4 changes: 2 additions & 2 deletions denis/peer_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

ids = []

ids += [sub for sub in utilities.user_to_sub(assignment, 'review1').values() if sub] # NOQA: E501
ids += [sub for sub in utilities.user_to_sub(assignment, 'review2').values() if sub] # NOQA: E501
ids += [sub for sub in utilities.user_to_sub(assignment, 'review1').values() if sub]
ids += [sub for sub in utilities.user_to_sub(assignment, 'review2').values() if sub]

utilities.release_subs(ids)

Expand Down
2 changes: 1 addition & 1 deletion denis/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def signal_handler(*_):
print(f'skipping initial for {name}', file=sys.stderr)

if in_the_future(peer_review):
procs.append(spawn_waiter(str(peer_review), name, './peer_review.py')) # NOQA: E501
procs.append(spawn_waiter(str(peer_review), name, './peer_review.py'))
else:
print(f'skipping peer review for {name}', file=sys.stderr)

Expand Down
8 changes: 4 additions & 4 deletions orbit/hyperspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,19 @@ def hyperspace_main(raw_args):
help='Create a new user from supplied credentials',
dest='do', const=do_newuser)
actions.add_argument('-m', '--mutatepassword', action='store_const',
help='Change password for supplied username to supplied password', # NOQA: E501
help='Change password for supplied username to supplied password',
dest='do', const=do_change_password)
actions.add_argument('-c', '--clearpassword', action='store_const',
help='clear password for supplied username so they cannot login', # NOQA: E501
help='clear password for supplied username so they cannot login',
dest='do', const=do_reset_password)
actions.add_argument('-w', '--withdrawuser', action='store_const',
help='Delete ("withdraw") the supplied username',
dest='do', const=do_delete_user)
actions.add_argument('-l', '--listsessions', action='store_const',
help='List of all known sessions (some could be invalid)', # NOQA: E501
help='List of all known sessions (some could be invalid)',
dest='do', const=do_list_sessions)
actions.add_argument('-d', '--dropsession', action='store_const',
help='Drop any existing valid session for supplied username', # NOQA: E501
help='Drop any existing valid session for supplied username',
dest='do', const=do_drop_session)

args = parser.parse_args(raw_args)
Expand Down
4 changes: 2 additions & 2 deletions orbit/radius.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self, env=None, username=None):
cok.load(raw)
res = cok.get('auth', cookies.Morsel()).value

if (ses_found := db.Session.get_or_none(db.Session.token == res)): # NOQA: E501
if (ses_found := db.Session.get_or_none(db.Session.token == res)):
self.token = ses_found.token
self.username = ses_found.username
self.expiry = datetime.fromtimestamp(ses_found.expiry)
Expand Down Expand Up @@ -385,7 +385,7 @@ def handle_activity(rocket):
return rocket.raw_respond(HTTPStatus.FORBIDDEN)

submissions = (mailman.db.Submission.select()
.where(mailman.db.Submission.user == rocket.session.username) # NOQA: E501
.where(mailman.db.Submission.user == rocket.session.username)
.order_by(- mailman.db.Submission.timestamp))

def submission_fields(sub):
Expand Down