From 061016f9d3b22c50daf58f094680b111ce70e68c Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Wed, 15 Jan 2025 20:22:23 +0530 Subject: [PATCH] chore: fix lint issues --- openedx_learning/apps/authoring/linking/admin.py | 6 ++++++ openedx_learning/apps/authoring/linking/models.py | 4 ++++ tests/openedx_learning/apps/authoring/linking/test_api.py | 6 +----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/openedx_learning/apps/authoring/linking/admin.py b/openedx_learning/apps/authoring/linking/admin.py index c7c964eb..0b230170 100644 --- a/openedx_learning/apps/authoring/linking/admin.py +++ b/openedx_learning/apps/authoring/linking/admin.py @@ -11,6 +11,9 @@ @admin.register(PublishableEntityLink) class PublishableEntityLinkAdmin(ReadOnlyModelAdmin): + """ + PublishableEntityLink admin. + """ fields = [ "uuid", "upstream_block", @@ -44,6 +47,9 @@ class PublishableEntityLinkAdmin(ReadOnlyModelAdmin): @admin.register(CourseLinksStatus) class CourseLinksStatusAdmin(admin.ModelAdmin): + """ + CourseLinksStatus admin. + """ fields = ( "context_key", "status", diff --git a/openedx_learning/apps/authoring/linking/models.py b/openedx_learning/apps/authoring/linking/models.py index 6125df50..5b3e8374 100644 --- a/openedx_learning/apps/authoring/linking/models.py +++ b/openedx_learning/apps/authoring/linking/models.py @@ -98,6 +98,10 @@ class CourseLinksStatusChoices(models.TextChoices): class CourseLinksStatus(models.Model): + """ + This table stores current processing status of upstream-downstream links in PublishableEntityLink table for a + course. + """ context_key = key_field( help_text=_("Linking status for downstream/course context key"), ) diff --git a/tests/openedx_learning/apps/authoring/linking/test_api.py b/tests/openedx_learning/apps/authoring/linking/test_api.py index 9ce1bbe4..c4193ab2 100644 --- a/tests/openedx_learning/apps/authoring/linking/test_api.py +++ b/tests/openedx_learning/apps/authoring/linking/test_api.py @@ -4,17 +4,13 @@ from __future__ import annotations from datetime import datetime, timezone -from uuid import UUID - -import pytest -from django.core.exceptions import ValidationError from openedx_learning.apps.authoring.components import api as components_api +from openedx_learning.apps.authoring.components.models import Component, ComponentType from openedx_learning.apps.authoring.linking import api as linking_api from openedx_learning.apps.authoring.linking.models import CourseLinksStatus, PublishableEntityLink from openedx_learning.apps.authoring.publishing import api as publishing_api from openedx_learning.apps.authoring.publishing.models import LearningPackage -from openedx_learning.apps.authoring.components.models import Component, ComponentType from openedx_learning.lib.test_utils import TestCase