Skip to content

Commit 7cea286

Browse files
committed
Make Pylint passing
1 parent c799850 commit 7cea286

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

conditional/blueprints/attendance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def get_seminar_hosts(meeting_id):
399399
hosts = [ldap_get_member(a.uid).displayName for a in
400400
MemberSeminarHost.query.filter(
401401
MemberSeminarHost.seminar_id == meeting_id).all()]
402-
402+
403403
for freshman in [a.fid for a in
404404
FreshmanSeminarHost.query.filter(
405405
FreshmanSeminarHost.seminar_id == meeting_id).all()]:
@@ -572,7 +572,7 @@ def get_cm_attendees(sid, user_dict=None):
572572
} for a in FreshmanSeminarAttendance.query.filter(
573573
FreshmanSeminarAttendance.seminar_id == sid).all()]:
574574
attendees.append(freshman)
575-
575+
576576
for freshman in [{"value": a.fid,
577577
"display": FreshmanAccount.query.filter(FreshmanAccount.id == a.fid).first().name
578578
} for a in FreshmanSeminarHost.query.filter(

conditional/blueprints/dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def display_dashboard(user_dict=None):
108108
) if is_seminar_attendance_valid(s)]
109109
data['ts_total'] = len(t_seminars)
110110
# technical seminars hosted
111-
t_seminars_hosted = [s.seminar_id for s in
111+
t_seminars_hosted = [s.seminar_id for s in
112112
MemberSeminarHost.query.filter(
113113
MemberSeminarHost.uid == uid,
114114
) if is_seminar_attendance_valid(s)]

conditional/blueprints/gatekeep.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def display_spring_evals(internal=False, user_dict=None):
112112
ts_attended_count = ts_count.get(uid, 0)
113113
ts_hosted_count = ts_host_count.get(uid, 0)
114114

115-
passing = len(member_missed_hms) <= 1 and cm_attended_count >= 6 and (ts_attended_count >= 2 or ts_hosted_count >= 1)
115+
ts_passing = ts_attended_count >= 2 or ts_hosted_count >= 1
116+
passing = len(member_missed_hms) <= 1 and cm_attended_count >= 6 and ts_passing
116117

117118
status = 'disenfranchised'
118119

conditional/blueprints/intro_evals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ def display_intro_evals(internal=False, user_dict=None):
231231
account_ts_attendance_dict[row[0]] = []
232232

233233
account_ts_attendance_dict[row[0]].append(row[1])
234-
234+
235235
for row in account_ts_hosted_query:
236236
if not row[0] in account_ts_hosted_dict:
237237
account_ts_hosted_dict[row[0]] = []
238-
238+
239239
account_ts_hosted_dict[row[0]].append(row[1])
240240

241241
# freshmen who have accounts

conditional/blueprints/member_management.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def member_management_upgrade_user(user_dict=None):
469469

470470
for fts in FreshmanSeminarAttendance.query.filter(FreshmanSeminarAttendance.fid == fid):
471471
db.session.add(MemberSeminarAttendance(uid, fts.seminar_id))
472-
472+
473473
for ftsh in FreshmanSeminarHost.query.filter(FreshmanSeminarHost.fid == fid):
474474
db.session.add(MemberSeminarHost(uid, ftsh.seminar_id))
475475

conditional/models/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class FreshmanSeminarHost(db.Model):
122122
id = Column(Integer, primary_key=True)
123123
fid = Column(ForeignKey('freshman_accounts.id', ondelete="cascade"), nullable=False, index=True)
124124
seminar_id = Column(ForeignKey('technical_seminars.id'), nullable=False)
125-
125+
126126
def __init__(self, fid, seminar_id):
127127
self.fid = fid
128128
self.seminar_id = seminar_id

conditional/util/member.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def get_freshman_data(user_name):
7777
TechnicalSeminar.id == s.seminar_id).first().approved]
7878
freshman['ts_total'] = len(t_seminars)
7979
# technical seminars hosted
80-
t_seminars_hosted = [s.seminar_id for s in
80+
t_seminars_hosted = [s.seminar_id for s in
8181
MemberSeminarHost.query.filter(
8282
MemberSeminarHost.uid == user_name
8383
) if TechnicalSeminar.query.filter(
@@ -288,7 +288,7 @@ def get_voting_members():
288288
).group_by(
289289
MemberSeminarHost.uid
290290
).having(
291-
func.count(MemberSeminarHost.uid) >= 1
291+
func.count(MemberSeminarHost.uid) >= 1 # pylint: disable=not-callable
292292
).all())
293293

294294
absent_hm = set(member.uid for member in MemberHouseMeetingAttendance.query.join(
@@ -404,7 +404,8 @@ def gatekeep_values(username):
404404
.count()
405405
)
406406

407-
result = eligibility_of_groups and (d_meetings >= 6 and (t_seminars >= 2 or t_seminars_hosted >= 1) and h_meetings_missed < 2) # pylint: disable=chained-comparison
407+
ts_passed = t_seminars >= 2 or t_seminars_hosted >= 1
408+
result = eligibility_of_groups and (d_meetings >= 6 and ts_passed and h_meetings_missed < 2) # pylint: disable=chained-comparison
408409

409410
return {
410411
"result": result,

0 commit comments

Comments
 (0)