Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
murhum1 committed Apr 11, 2024
1 parent 6920c7b commit ce46d6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions course/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def test_student_enroll_from_sis(self):
# Sisu import should not remove manually enrolled students
self.past_course_instance.enroll_student(self.user1)
self.assertTrue(self.past_course_instance.is_student(self.user1))
response = self.client.post( # pylint: disable=unused-variable
response = self.client.post(
reverse("enroll-students", kwargs={
'course_slug': self.course.url,
'instance_slug': self.past_course_instance.url,
Expand All @@ -427,7 +427,7 @@ def test_student_enroll_from_sis(self):
self.past_course_instance.enroll_student(self.user2, from_sis=True)
self.assertTrue(self.past_course_instance.is_student(self.user1))
self.assertTrue(self.past_course_instance.is_student(self.user2))
response = self.client.post( # pylint: disable=unused-variable
response = self.client.post(
reverse("enroll-students", kwargs={
'course_slug': self.course.url,
'instance_slug': self.past_course_instance.url,
Expand Down
7 changes: 6 additions & 1 deletion exercise/templatetags/exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ def check_exercise_deadline_extensions(children, entry_name, is_module_specific=
exercise_count = 0
for exercise in children:
# Module specific ToC page
if is_module_specific and exercise.parent and exercise.parent.name == entry_name and exercise.personal_deadline:
if (
is_module_specific
and exercise.parent
and exercise.parent.name == entry_name
and exercise.personal_deadline
):
exercise_count += 1
# ToC page
elif exercise.type != 'level' and not exercise.is_empty and exercise.submittable:
Expand Down

0 comments on commit ce46d6f

Please sign in to comment.