diff --git a/lti_consumer/lti_1p3/ags.py b/lti_consumer/lti_1p3/ags.py index 9be67e3a4819593c52dd17c6f94a6834dfe11bcc..d9cac3f61b9bbc8c6128e36f556d17fbb911d6bc 100644 --- a/lti_consumer/lti_1p3/ags.py +++ b/lti_consumer/lti_1p3/ags.py @@ -22,7 +22,7 @@ class LtiAgs: lineitem_url=None, allow_creating_lineitems=True, results_service_enabled=True, - scores_service_enabled=True + scores_service_enabled=True, ): """ Instance class with LTI AGS Global settings. @@ -37,7 +37,6 @@ class LtiAgs: # Lineitems urls self.lineitems_url = lineitems_url - self.lineitem_url = lineitem_url def get_available_scopes(self): diff --git a/lti_consumer/lti_1p3/consumer.py b/lti_consumer/lti_1p3/consumer.py index f85d9ccd64cb907d3570803c77f9f8dbe824a914..2dfd2cf1d7a2ec9e118c843cc5b602eff4e52416 100644 --- a/lti_consumer/lti_1p3/consumer.py +++ b/lti_consumer/lti_1p3/consumer.py @@ -476,7 +476,7 @@ class LtiAdvantageConsumer(LtiConsumer1p3): self, lineitems_url, lineitem_url=None, - allow_programatic_grade_interaction=False + allow_programatic_grade_interaction=False, ): """ Enable LTI Advantage Assignments and Grades Service. @@ -490,7 +490,7 @@ class LtiAdvantageConsumer(LtiConsumer1p3): lineitem_url=lineitem_url, allow_creating_lineitems=allow_programatic_grade_interaction, results_service_enabled=True, - scores_service_enabled=True + scores_service_enabled=True, ) # Include LTI AGS claim inside the LTI Launch message diff --git a/lti_consumer/models.py b/lti_consumer/models.py index f3b9f342ca7284105b169fbc571ea1615917fd6f..0be83aadab705f192a2861ca507296e5453bd676 100644 --- a/lti_consumer/models.py +++ b/lti_consumer/models.py @@ -226,7 +226,7 @@ class LtiConfiguration(models.Model): default_values = { 'resource_id': self.block.location, 'score_maximum': self.block.weight, - 'label': self.block.display_name + 'label': self.block.display_name, } if hasattr(self.block, 'start'): @@ -244,7 +244,7 @@ class LtiConfiguration(models.Model): consumer.enable_ags( lineitems_url=get_lti_ags_lineitems_url(self.id), - lineitem_url=get_lti_ags_lineitems_url(self.id, lineitem.id) + lineitem_url=get_lti_ags_lineitems_url(self.id, lineitem.id), ) return consumer diff --git a/lti_consumer/plugin/compat.py b/lti_consumer/plugin/compat.py index 0c3d0f149ca102436210b381f221e431c2497fea..02152fb198382afea0faef436a34086a78aa0ecd 100644 --- a/lti_consumer/plugin/compat.py +++ b/lti_consumer/plugin/compat.py @@ -92,5 +92,5 @@ def publish_grade(block, user, score, possible, only_if_higher=False, score_dele raw_possible=possible, only_if_higher=only_if_higher, score_deleted=score_deleted, - grader_response=comment + grader_response=comment, ) diff --git a/lti_consumer/signals.py b/lti_consumer/signals.py index 453a12b559a19b11a7110aa31eedec912fafff29..83f242fc5593e7bff81ef1cc64dbe32c1d1f43c1 100644 --- a/lti_consumer/signals.py +++ b/lti_consumer/signals.py @@ -25,5 +25,5 @@ def publish_grade_on_score_update(sender, instance, **kwargs): # pylint: disabl user, score, instance.score_maximum, - comment=instance.comment + comment=instance.comment, ) diff --git a/lti_consumer/tests/unit/plugin/test_views_lti_ags.py b/lti_consumer/tests/unit/plugin/test_views_lti_ags.py index c48b4809aef80dc8d43690f74523f50a31674970..4d6772ff1e3172b72c3205eaf7b3eaf944a95732 100644 --- a/lti_consumer/tests/unit/plugin/test_views_lti_ags.py +++ b/lti_consumer/tests/unit/plugin/test_views_lti_ags.py @@ -45,7 +45,7 @@ class LtiAgsLineItemViewSetTestCase(APITransactionTestCase): # xblock due date related attributes 'due': timezone.now(), 'graceperiod': timedelta(days=2), - 'accept_grades_past_due': False + 'accept_grades_past_due': False, } self.xblock = make_xblock('lti_consumer', LtiConsumerXBlock, self.xblock_attributes) @@ -55,7 +55,7 @@ class LtiAgsLineItemViewSetTestCase(APITransactionTestCase): # Create configuration self.lti_config = LtiConfiguration.objects.create( location=str(self.xblock.location), - version=LtiConfiguration.LTI_1P3 + version=LtiConfiguration.LTI_1P3, ) # Preload XBlock to avoid calls to modulestore self.lti_config.block = self.xblock @@ -407,7 +407,7 @@ class LtiAgsViewSetScoresTests(LtiAgsLineItemViewSetTestCase): "comment": "This is exceptional work.", "activityProgress": LtiAgsScore.COMPLETED, "gradingProgress": LtiAgsScore.FULLY_GRADED, - "userId": self.primary_user_id + "userId": self.primary_user_id, } if override_data: @@ -424,7 +424,7 @@ class LtiAgsViewSetScoresTests(LtiAgsLineItemViewSetTestCase): LtiAgsScore.PENDING_MANUAL, LtiAgsScore.FULLY_GRADED, LtiAgsScore.FAILED, - LtiAgsScore.NOT_READY + LtiAgsScore.NOT_READY, ) def test_xblock_grade_publish_on_score_save(self, grading_progress): """ @@ -432,7 +432,7 @@ class LtiAgsViewSetScoresTests(LtiAgsLineItemViewSetTestCase): """ self._post_lti_score({ - "gradingProgress": grading_progress + "gradingProgress": grading_progress, }) if grading_progress == LtiAgsScore.FULLY_GRADED: @@ -488,7 +488,7 @@ class LtiAgsViewSetScoresTests(LtiAgsLineItemViewSetTestCase): Test grade publish after due date when accept_grades_past_due is True. Grade should publish. """ xblock_attrs = { - 'accept_grades_past_due': True + 'accept_grades_past_due': True, } xblock_attrs.update(self.xblock_attributes) xblock = make_xblock('lti_consumer', LtiConsumerXBlock, xblock_attrs)