diff --git a/lms/services/digest.py b/lms/services/digest.py index 60761822f9..1a386f07cf 100644 --- a/lms/services/digest.py +++ b/lms/services/digest.py @@ -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 - ) + } ), } ) @@ -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, } @@ -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, } @@ -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: diff --git a/lms/views/api/canvas/authorize.py b/lms/views/api/canvas/authorize.py index 989b58dcc0..6b52aeee54 100644 --- a/lms/views/api/canvas/authorize.py +++ b/lms/views/api/canvas/authorize.py @@ -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( diff --git a/pyproject.toml b/pyproject.toml index 64ce55f634..40c0de1432 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,6 @@ ignore = [ "RET504", "RET501", "PLR6301", - "C401", "E721", ]