Skip to content

Commit

Permalink
Enable ruff's C401 rule
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Oct 23, 2024
1 parent cddf04d commit 495ae42
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
16 changes: 8 additions & 8 deletions lms/services/digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ def instructor_digest(self, h_userid):
"title": assignment_info.title,
"num_annotations": len(assignment_learner_annotations),
"annotators": list(
set(
{
annotation.userid
for annotation in assignment_learner_annotations
)
}
),
}
)
Expand All @@ -248,10 +248,10 @@ def instructor_digest(self, h_userid):
"title": course_info.title,
"num_annotations": num_annotations,
"annotators": list(
set(
{
annotation.userid
for annotation in course_info.learner_annotations
)
}
),
"assignments": course_assignments,
}
Expand All @@ -262,11 +262,11 @@ def instructor_digest(self, h_userid):
course_digest["num_annotations"] for course_digest in course_digests
),
"annotators": list(
set(
{
annotator
for course_digest in course_digests
for annotator in course_digest["annotators"]
)
}
),
"courses": course_digests,
}
Expand Down Expand Up @@ -346,9 +346,9 @@ def course_infos(self):
if self._course_infos is not None:
return self._course_infos

authority_provided_ids = set(
authority_provided_ids = {
annotation.authority_provided_id for annotation in self.annotations
)
}

# We're going to be joining the grouping table to itself and this requires
# us to create an alias for one side of the join, see:
Expand Down
2 changes: 1 addition & 1 deletion lms/views/api/canvas/authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

# All the scopes that our LMS app may use.
ALL_SCOPES = set(scope for scopes in SCOPES.values() for scope in scopes)
ALL_SCOPES = {scope for scopes in SCOPES.values() for scope in scopes}


@view_config(
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ ignore = [
"RET504",
"RET501",
"PLR6301",
"C401",
"E721",
]

Expand Down

0 comments on commit 495ae42

Please sign in to comment.