fix: added type annotations to fix mypy failure in CI (#28933)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# lint-amnesty, pylint: disable=missing-module-docstring
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from typing import Dict
|
||||
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from openedx.core import types
|
||||
@@ -12,6 +13,7 @@ from xmodule.partitions.partitions import (
|
||||
ENROLLMENT_TRACK_PARTITION_ID,
|
||||
)
|
||||
from xmodule.partitions.partitions_service import get_user_partition_groups
|
||||
from xmodule.partitions.partitions import Group
|
||||
|
||||
from .base import OutlineProcessor
|
||||
|
||||
@@ -28,10 +30,10 @@ class EnrollmentTrackPartitionGroupsOutlineProcessor(OutlineProcessor):
|
||||
"""
|
||||
def __init__(self, course_key: CourseKey, user: types.User, at_time: datetime):
|
||||
super().__init__(course_key, user, at_time)
|
||||
self.enrollment_track_groups = {}
|
||||
self.enrollment_track_groups: Dict[str, Group] = {}
|
||||
self.user_group = None
|
||||
|
||||
def load_data(self, full_course_outline):
|
||||
def load_data(self, full_course_outline) -> None:
|
||||
"""
|
||||
Pull track groups for this course and which group the user is in.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user