From e71efcc2d03a2e38d5c445de893eb3bfd3732906 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Fri, 13 Dec 2024 17:18:48 +0100 Subject: [PATCH] refactor: address quality issues from latest commits --- openedx_events/analytics/data.py | 2 -- openedx_events/event_bus/avro/custom_serializers.py | 2 -- openedx_events/event_bus/avro/tests/test_avro.py | 4 +++- openedx_events/tooling.py | 3 --- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/openedx_events/analytics/data.py b/openedx_events/analytics/data.py index 568eafff3..801ebdd58 100644 --- a/openedx_events/analytics/data.py +++ b/openedx_events/analytics/data.py @@ -9,8 +9,6 @@ import attr -from typing import Dict - @attr.s(frozen=True) class TrackingLogData: diff --git a/openedx_events/event_bus/avro/custom_serializers.py b/openedx_events/event_bus/avro/custom_serializers.py index ad596c910..d3503011b 100644 --- a/openedx_events/event_bus/avro/custom_serializers.py +++ b/openedx_events/event_bus/avro/custom_serializers.py @@ -13,8 +13,6 @@ from openedx_events.event_bus.avro.types import PYTHON_TYPE_TO_AVRO_MAPPING -import json - class BaseCustomTypeAvroSerializer(ABC): """ Used by openedx_events.avro_utilities class to serialize/deserialize custom types. diff --git a/openedx_events/event_bus/avro/tests/test_avro.py b/openedx_events/event_bus/avro/tests/test_avro.py index 53e01a252..67c806bdc 100644 --- a/openedx_events/event_bus/avro/tests/test_avro.py +++ b/openedx_events/event_bus/avro/tests/test_avro.py @@ -125,7 +125,9 @@ def generate_test_event_data_for_data_type(data_type): # pragma: no cover "block-v1:edx+DemoX+Demo_course+type@video+block@UaEBjyMjcLW65gaTXggB93WmvoxGAJa0JeHRrDThk", )}, dict[str, LibraryLocatorV2]: {'key': LibraryLocatorV2.from_string('lib:MITx:reallyhardproblems')}, - dict[str, LibraryUsageLocatorV2]: {'key': LibraryUsageLocatorV2.from_string('lb:MITx:reallyhardproblems:problem:problem1')}, + dict[str, LibraryUsageLocatorV2]: { + 'key': LibraryUsageLocatorV2.from_string('lb:MITx:reallyhardproblems:problem:problem1'), + }, dict[str, List[int]]: {'key': [1, 2, 3]}, dict[str, List[str]]: {'key': ["hi", "there"]}, dict[str, dict[str, str]]: {'key': {'key': 'value'}}, diff --git a/openedx_events/tooling.py b/openedx_events/tooling.py index c6fa1bbfb..1beb55a08 100644 --- a/openedx_events/tooling.py +++ b/openedx_events/tooling.py @@ -24,9 +24,6 @@ "org.openedx.content_authoring.course.certificate_config.changed.v1", "org.openedx.content_authoring.course.certificate_config.deleted.v1", "org.openedx.learning.user.notification.requested.v1", - #"org.openedx.learning.thread.created.v1", - #"org.openedx.learning.response.created.v1", - #"org.openedx.learning.comment.created.v1", "org.openedx.learning.course.notification.requested.v1", "org.openedx.learning.ora.submission.created.v1", ]