INCR-254 Run python-modernize on lms/djangoapps/shoppingcart/migrations and lms/djangoapps/shoppingcart/processors (#20556)

* run python modernize

* run isort

* Fix quality
This commit is contained in:
Stu Young
2019-05-21 11:39:46 -04:00
committed by Christie Rice
parent 1e01baf979
commit caa9fd0009
9 changed files with 21 additions and 9 deletions

View File

@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.utils.timezone
import django.db.models.deletion
from django.conf import settings
import django.utils.timezone
import model_utils.fields
from django.conf import settings
from django.db import migrations, models
from opaque_keys.edx.django.models import CourseKeyField

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-14 20:37
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations

View File

@@ -20,6 +20,8 @@ To enable this implementation, add the following Django settings:
"""
from __future__ import absolute_import
import binascii
import hmac
import json
@@ -209,7 +211,7 @@ def sign(params):
dict: The same parameters dict, with a 'signature' key calculated from the other values.
"""
fields = u",".join(params.keys())
fields = u",".join(list(params.keys()))
params['signed_field_names'] = fields
signed_fields = params.get('signed_field_names', '').split(',')

View File

@@ -9,8 +9,9 @@ The specific implementation is determined at runtime using Django settings:
"""
from django.conf import settings
from __future__ import absolute_import
from django.conf import settings
# Import the processor implementation, using `CC_PROCESSOR_NAME`
# as the name of the Python module in `shoppingcart.processors`

View File

@@ -1,3 +1,8 @@
"""
Payment processing exceptions
"""
from __future__ import absolute_import
from shoppingcart.exceptions import PaymentException

View File

@@ -3,6 +3,8 @@ Helper methods for credit card processing modules.
These methods should be shared among all processor implementations,
but should NOT be imported by modules outside this package.
"""
from __future__ import absolute_import
from django.conf import settings
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers

View File

@@ -2,6 +2,8 @@
"""
Tests for the newer CyberSource API implementation.
"""
from __future__ import absolute_import
import ddt
from django.conf import settings
from django.test import TestCase