INCR-304 Run python-modernize on lms/djangoapps/discussion/management (#20622)
* run python modernize * run isort
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# pylint: disable=missing-docstring
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from openedx.core.djangoapps.django_comment_common.models import Role
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ This must be run only after seed_permissions_roles.py!
|
||||
Creates default roles for all users in the provided course. Just runs through
|
||||
Enrollments.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from openedx.core.djangoapps.django_comment_common.models import assign_default_role_on_enrollment
|
||||
from student.models import CourseEnrollment
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@ This must be run only after seed_permissions_roles.py!
|
||||
Creates default roles for all users currently in the database. Just runs through
|
||||
Enrollments.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from openedx.core.djangoapps.django_comment_common.models import assign_default_role_on_enrollment
|
||||
from student.models import CourseEnrollment
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
# pylint: disable=missing-docstring
|
||||
from courseware.courses import get_course
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
|
||||
from courseware.courses import get_course
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Write a discussion link for a given course on standard output.'
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
"""
|
||||
Reload forum (comment client) users from existing users.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
import openedx.core.djangoapps.django_comment_common.comment_client as cc
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
"""
|
||||
Management command to seed default permissions and roles.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
|
||||
from openedx.core.djangoapps.django_comment_common.utils import seed_permissions_roles
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# pylint: disable=missing-docstring,too-many-format-args
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
@@ -3,8 +3,11 @@ One-off script to sync all user information to the
|
||||
discussion service (later info will be synced automatically)
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
import openedx.core.djangoapps.django_comment_common.comment_client as cc
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user