INCR-304 Run python-modernize on lms/djangoapps/discussion/management (#20622)

* run python modernize

* run isort
This commit is contained in:
Stu Young
2019-05-15 15:01:53 -04:00
committed by Christie Rice
parent c557379cab
commit fc80b28bbc
8 changed files with 19 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.'

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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