Removed deprecated future imports (#24295)

This commit is contained in:
Aarif
2020-06-28 23:40:03 +05:00
committed by GitHub
53 changed files with 109 additions and 130 deletions

View File

@@ -1,11 +1,12 @@
""" Code to allow module store to interface with courseware index """
import logging
import re
from abc import ABCMeta, abstractmethod
from datetime import timedelta
from contentstore.course_group_config import GroupConfiguration
from course_modes.models import CourseMode
from django.conf import settings
from django.urls import resolve
from django.utils.translation import ugettext as _
@@ -13,14 +14,12 @@ from django.utils.translation import ugettext_lazy
from eventtracking import tracker
from search.search_engine_base import SearchEngine
from six import add_metaclass, string_types, text_type
from contentstore.course_group_config import GroupConfiguration
from course_modes.models import CourseMode
from openedx.core.lib.courses import course_image_url
from xmodule.annotator_mixin import html_to_text
from xmodule.library_tools import normalize_key_for_search
from xmodule.modulestore import ModuleStoreEnum
from openedx.core.lib.courses import course_image_url
# REINDEX_AGE is the default amount of time that we look back for changes
# that might have happened. If we are provided with a time at which the
# indexing is triggered, then we know it is safe to only index items
@@ -59,11 +58,10 @@ class SearchIndexingError(Exception):
@add_metaclass(ABCMeta)
class SearchIndexerBase(object):
class SearchIndexerBase(object, metaclass=ABCMeta):
"""
Base class to perform indexing for courseware or library search from different modulestores
"""
__metaclass__ = ABCMeta
INDEX_NAME = None
DOCUMENT_TYPE = None