INCR-207 ran python-modernize and isort as described in the case. (#20430)

This commit is contained in:
Bill Tucker
2019-05-08 14:17:47 -04:00
committed by Jeremy Bowman
parent 7f676317e6
commit b1ff149953
6 changed files with 13 additions and 13 deletions

View File

@@ -4,13 +4,14 @@ Management command for creating a Django OAuth Toolkit Application model.
Also creates an oauth_dispatch application access if scopes are provided.
"""
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import logging
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
from oauth2_provider.models import get_application_model
from openedx.core.djangoapps.oauth_dispatch.models import ApplicationAccess
logger = logging.getLogger(__name__)

View File

@@ -1,4 +1,4 @@
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import logging
from datetime import timedelta

View File

@@ -2,20 +2,19 @@
Management command for generating an asymmetric keypair to sign JSON Web Tokens.
"""
# pylint: disable=missing-docstring
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, print_function, unicode_literals
import logging
import json
import logging
import random
import string
from argparse import RawTextHelpFormatter
from django.conf import settings
from django.core.management.base import BaseCommand
from Cryptodome.PublicKey import RSA
from django.conf import settings
from django.core.management.base import BaseCommand
from jwkest import jwk
from six.moves import range
log = logging.getLogger(__name__)

View File

@@ -1,3 +1,5 @@
from __future__ import absolute_import
import unittest
from datetime import timedelta

View File

@@ -4,7 +4,6 @@ Tests the ``create_dot_application`` management command.
from __future__ import absolute_import, unicode_literals
import ddt
from django.core.management import call_command
from django.test import TestCase
from oauth2_provider.models import get_application_model
@@ -14,7 +13,6 @@ from student.tests.factories import UserFactory
from ..create_dot_application import Command
Application = get_application_model()

View File

@@ -2,19 +2,19 @@
Tests the ``generate_jwt_signing_key`` management command.
"""
# pylint: disable=missing-docstring
from __future__ import absolute_import
import sys
from contextlib import contextmanager
from StringIO import StringIO
import ddt
from mock import patch
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from openedx.core.djangolib.testing.utils import skip_unless_lms
COMMAND_NAME = 'generate_jwt_signing_key'
LOGGER = 'openedx.core.djangoapps.oauth_dispatch.management.commands.generate_jwt_signing_key.log.info'
TEST_KEY_IDENTIFIER = 'some_key_identifier'