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 796d68a
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 @@ -384,7 +384,7 @@ def test_student_enroll(self):
self.assertFalse(self.current_course_instance.is_student(self.user1))
self.assertFalse(self.current_course_instance.is_student(self.user2))
self.client.login(username="staff", password="staffPassword")
response = self.client.post( # pylint: disable=unused-variable
response = self.client.post(
reverse("enroll-students", kwargs={
'course_slug': self.course.url,
'instance_slug': self.current_course_instance.url,
Expand All @@ -400,7 +400,7 @@ def test_student_enroll_from_sis(self):
self.assertFalse(self.current_course_instance.is_student(self.user1))
self.assertFalse(self.current_course_instance.is_student(self.user2))
self.client.login(username="staff", password="staffPassword")
response = self.client.post( # pylint: disable=unused-variable
response = self.client.post(
reverse("enroll-students", kwargs={
'course_slug': self.course.url,
'instance_slug': self.current_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 796d68a

Please sign in to comment.