Fixing python-modernize issues.

This commit is contained in:
arbisoft
2019-07-10 14:45:42 +05:00
parent 92c7a43011
commit 0be1ca7876
4 changed files with 10 additions and 6 deletions

View File

@@ -2,9 +2,11 @@
User Authentication Configuration
"""
from __future__ import absolute_import
from django.apps import AppConfig
from openedx.core.djangoapps.plugins.constants import ProjectType, PluginURLs
from openedx.core.djangoapps.plugins.constants import PluginURLs, ProjectType
class UserAuthnConfig(AppConfig):

View File

@@ -1,7 +1,7 @@
"""
Utility functions for setting "logged in" cookies used by subdomains.
"""
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import json
import logging
@@ -13,10 +13,10 @@ from django.contrib.auth.models import User
from django.dispatch import Signal
from django.urls import NoReverseMatch, reverse
from django.utils.http import cookie_date
from edx_rest_framework_extensions.auth.jwt import cookies as jwt_cookies
from edx_rest_framework_extensions.auth.jwt.constants import JWT_DELIMITER
from oauth2_provider.models import Application
from openedx.core.djangoapps.oauth_dispatch.adapters import DOTAdapter
from openedx.core.djangoapps.oauth_dispatch.api import create_dot_access_token
from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_from_token
@@ -24,7 +24,6 @@ from openedx.core.djangoapps.user_api.accounts.utils import retrieve_last_sitewi
from openedx.core.djangoapps.user_authn.exceptions import AuthFailedError
from student.models import CourseEnrollment
log = logging.getLogger(__name__)

View File

@@ -1,5 +1,7 @@
""" User Authn related Exceptions. """
from __future__ import absolute_import
from openedx.core.djangolib.markup import Text

View File

@@ -6,11 +6,12 @@ For now, this is needed because of difference in CMS and LMS that have
not yet been cleaned up.
"""
from __future__ import absolute_import
from django.conf import settings
from django.conf.urls import url
from .views import auto_auth, login, logout, deprecated
from .views import auto_auth, deprecated, login, logout
urlpatterns = [
url(r'^create_account$', deprecated.create_account, name='create_account'),