Skip to content

Commit 9056f40

Browse files
committed
Fixed more lint errors. There are some lint errors hat i just cant fix, like line length in some log statements, and too many args
1 parent ef3870a commit 9056f40

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

conditional/blueprints/attendance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,9 @@ def get_seminar_attendees(meeting_id):
425425
TechnicalSeminar.approved == False).all()] # pylint: disable=singleton-comparison
426426
all_meetings = sorted((all_cm + all_ts), key=lambda k: k['dt_obj'], reverse=True)[offset:limit]
427427
if len(all_cm) % 10 != 0:
428-
total_pages = (int(len(all_cm) / 10) + 1)
428+
total_pages = int(len(all_cm) / 10) + 1
429429
else:
430-
total_pages = (int(len(all_cm) / 10))
430+
total_pages = int(len(all_cm) / 10)
431431
return render_template('attendance_history.html',
432432
username=user_dict['username'],
433433
history=all_meetings,

conditional/blueprints/dashboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def display_dashboard(user_dict=None):
3838
# Get the list of voting members.
3939
can_vote = get_voting_members()
4040

41-
data = dict()
41+
data = {}
4242
data['username'] = user_dict['account'].uid
4343
data['active'] = ldap_is_active(user_dict['account'])
4444
data['bad_standing'] = ldap_is_bad_standing(user_dict['account'])
@@ -71,7 +71,7 @@ def display_dashboard(user_dict=None):
7171

7272
# only show housing if member has onfloor status
7373
if ldap_is_onfloor(user_dict['account']):
74-
housing = dict()
74+
housing = {}
7575
housing['points'] = user_dict['account'].housingPoints
7676
housing['room'] = user_dict['account'].roomNumber
7777
housing['queue_pos'] = get_queue_position(user_dict['account'].uid)

conditional/blueprints/major_project_submission.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import requests
55
import boto3
6-
from botocore.exceptions import ClientError
76

87
from flask import Blueprint
98
from flask import request
@@ -185,4 +184,4 @@ def major_project_delete(pid, user_dict=None):
185184
return "Must be project owner to delete!", 401
186185

187186
def send_slack_ping(payload):
188-
requests.post(app.config['WEBHOOK_URL'], json.dumps(payload))
187+
requests.post(app.config['WEBHOOK_URL'], json.dumps(payload), timeout=120)

conditional/blueprints/member_management.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def member_management_deleteuser(fid, user_dict=None):
413413
if not fid.isdigit():
414414
return "can only delete freshman accounts", 400
415415

416-
log.info('backend', action="delete freshman account %s" % fid)
416+
log.info('backend', action=f"delete freshman account {fid}")
417417

418418
for fca in FreshmanCommitteeAttendance.query.filter(FreshmanCommitteeAttendance.fid == fid):
419419
db.session.delete(fca)

conditional/util/context_processors.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def check_current_student(username):
3333

3434
@app.context_processor
3535
def utility_processor():
36-
return dict(
37-
get_csh_name=get_csh_name, get_freshman_name=get_freshman_name, get_member_name=get_member_name,
38-
check_current_student=check_current_student
39-
)
36+
return {
37+
"get_csh_name": get_csh_name,
38+
"get_freshman_name": get_freshman_name,
39+
"get_member_name": get_member_name,
40+
"check_current_student": check_current_student
41+
}

0 commit comments

Comments
 (0)