INCR-314 Run python-modernize on lms/djangoapps/grades/config and lms/djangoapps/grades/settings (#20611)
* run python modernize * run isort * Fix quality
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
"""
|
||||
Defines grading configuration.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from lms.djangoapps.grades.config.models import PersistentGradesEnabledFlag
|
||||
from lms.djangoapps.grades.config.waffle import waffle as waffle_func, ASSUME_ZERO_GRADE_IF_ABSENT
|
||||
from lms.djangoapps.grades.config.waffle import ASSUME_ZERO_GRADE_IF_ABSENT
|
||||
from lms.djangoapps.grades.config.waffle import waffle as waffle_func
|
||||
|
||||
|
||||
def assume_zero_if_absent(course_key):
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
"""
|
||||
Defines a form for providing validation of subsection grade templates.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
|
||||
from django import forms
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Models for configuration of the feature flags
|
||||
controlling persistent grades.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from config_models.models import ConfigurationModel
|
||||
from django.conf import settings
|
||||
from django.db.models import BooleanField, IntegerField, TextField
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Tests for the models that control the
|
||||
persistent grading feature.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import itertools
|
||||
|
||||
import ddt
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
Provides helper functions for tests that want
|
||||
to configure flags related to persistent grading.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from edx_django_utils.cache import RequestCache
|
||||
|
||||
from lms.djangoapps.grades.config.models import CoursePersistentGradesFlag, PersistentGradesEnabledFlag
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
This module contains various configuration settings via
|
||||
waffle switches for the Grades app.
|
||||
"""
|
||||
from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace, WaffleFlagNamespace, CourseWaffleFlag
|
||||
from __future__ import absolute_import
|
||||
|
||||
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlagNamespace, WaffleSwitchNamespace
|
||||
|
||||
# Namespace
|
||||
WAFFLE_NAMESPACE = u'grades'
|
||||
|
||||
Reference in New Issue
Block a user