Skip to content

Commit

Permalink
fix: Pylint errors wrong-import-order
Browse files Browse the repository at this point in the history
  • Loading branch information
becdavid committed Jan 3, 2024
1 parent efa113e commit e649339
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
include:
- module-name: lms-1
path: "lms/djangoapps/badges/ lms/djangoapps/bigcommerce_app/ lms/djangoapps/branding/ lms/djangoapps/bulk_email/ lms/djangoapps/bulk_enroll/ lms/djangoapps/bulk_user_retirement/ lms/djangoapps/ccx/ lms/djangoapps/certificates/ lms/djangoapps/commerce/ lms/djangoapps/course_api/ lms/djangoapps/course_blocks/ lms/djangoapps/course_home_api/ lms/djangoapps/course_wiki/ lms/djangoapps/coursewarehistoryextended/ lms/djangoapps/dashboard/ lms/djangoapps/debug/ lms/djangoapps/courseware/ lms/djangoapps/course_goals/ lms/djangoapps/rss_proxy/"
path: "lms/djangoapps/badges/ lms/djangoapps/save_for_later/ lms/djangoapps/bigcommerce_app/ lms/djangoapps/branding/ lms/djangoapps/bulk_email/ lms/djangoapps/bulk_enroll/ lms/djangoapps/bulk_user_retirement/ lms/djangoapps/ccx/ lms/djangoapps/certificates/ lms/djangoapps/commerce/ lms/djangoapps/course_api/ lms/djangoapps/course_blocks/ lms/djangoapps/course_home_api/ lms/djangoapps/course_wiki/ lms/djangoapps/coursewarehistoryextended/ lms/djangoapps/debug/ lms/djangoapps/courseware/ lms/djangoapps/course_goals/ lms/djangoapps/rss_proxy/"
- module-name: lms-2
path: "lms/djangoapps/gating/ lms/djangoapps/grades/ lms/djangoapps/instructor/ lms/djangoapps/instructor_analytics/ lms/djangoapps/discussion/ lms/djangoapps/edxnotes/ lms/djangoapps/email_marketing/ lms/djangoapps/experiments/ lms/djangoapps/instructor_task/ lms/djangoapps/learner_dashboard/ lms/djangoapps/lms_initialization/ lms/djangoapps/lms_xblock/ lms/djangoapps/lti_provider/ lms/djangoapps/mailing/ lms/djangoapps/mobile_api/ lms/djangoapps/monitoring/ lms/djangoapps/ora_staff_grader/ lms/djangoapps/program_enrollments/ lms/djangoapps/rss_proxy lms/djangoapps/static_template_view/ lms/djangoapps/staticbook/ lms/djangoapps/support/ lms/djangoapps/survey/ lms/djangoapps/teams/ lms/djangoapps/tests/ lms/djangoapps/user_tours/ lms/djangoapps/verify_student/ lms/envs/ lms/lib/ lms/tests.py"
- module-name: openedx-1
Expand Down
16 changes: 8 additions & 8 deletions common/djangoapps/third_party_auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,28 +375,28 @@ class EmailProviderConfig(ProviderConfig):
backend_name = models.CharField(
max_length=50, blank=False, db_index=True,
help_text=(
u"Which python-social-auth Email provider backend to use. "
"Which python-social-auth Email provider backend to use. "
"The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting."
# To be precise, it's set by AUTHENTICATION_BACKENDS
# which production.py sets from THIRD_PARTY_AUTH_BACKENDS
)
)
key = models.TextField(blank=True, verbose_name=u"Client ID")
key = models.TextField(blank=True, verbose_name="Client ID")
secret = models.TextField(
blank=True,
verbose_name=u"Client Secret",
verbose_name="Client Secret",
help_text=(
u'For increased security, you can avoid storing this in your database by leaving '
'For increased security, you can avoid storing this in your database by leaving '
' this field blank and setting '
'SOCIAL_AUTH_OAUTH_SECRETS = {"(backend name)": "secret", ...} '
'in your instance\'s Django settings (or lms.auth.json)'
)
)
other_settings = models.TextField(blank=True, help_text=u"Optional JSON object with advanced settings, if any.")
other_settings = models.TextField(blank=True, help_text="Optional JSON object with advanced settings, if any.")

class Meta(object):
app_label = "third_party_auth"
verbose_name = u"Provider Configuration (Email)"
verbose_name = "Provider Configuration (Email)"
verbose_name_plural = verbose_name

def clean(self):
Expand Down Expand Up @@ -430,7 +430,7 @@ def bigcommerce_retrieve_and_store_customer(self, payload):
return BigCommerceAPI.bigcommerce_customer_save(payload)
except Exception as excep: # pylint: disable=broad-except
log.error(
u"Error decoding Customer payload token and storing in database."
"Error decoding Customer payload token and storing in database."
)
return internal_server_error(excep)

Expand All @@ -440,7 +440,7 @@ def bigcommerce_save_store_customer_platform_user(self, payload):
return BigCommerceAPI.bigcommerce_store_customer_platform_user_save(payload)
except Exception as excep: # pylint: disable=broad-except
log.error(
u"Error decoding Customer payload token and storing in database."
"Error decoding Customer payload token and storing in database."
)
return internal_server_error(excep)

Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/bigcommerce_app/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BigCommerceAppConfig(AppConfig):
"""
Application Configuration for BigCommerce.
"""
name = u'lms.djangoapps.bigcommerce_app'
name = 'lms.djangoapps.bigcommerce_app'

def ready(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/bigcommerce_app/callbacks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from django.shortcuts import redirect, reverse
# from django.urls import reverse

from bigcommerce.api import BigcommerceApi

from lms.djangoapps.bigcommerce_app.models import Store, AdminUser, StoreAdminUser
from lms.djangoapps.bigcommerce_app.utils import (
internal_server_error,
Expand All @@ -16,8 +18,6 @@
platform_lms_url
)

from bigcommerce.api import BigcommerceApi

LOGGER = logging.getLogger(__name__)


Expand Down
5 changes: 3 additions & 2 deletions lms/djangoapps/bigcommerce_app/single_click/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
from django.http import HttpResponse
from django.utils.translation import gettext as _
from django.views.decorators.clickjacking import xframe_options_exempt

from bigcommerce.api import BigcommerceApi

from common.djangoapps.edxmako.shortcuts import render_to_response
from lms.djangoapps.bigcommerce_app.models import StoreAdminUser
from lms.djangoapps.bigcommerce_app.utils import client_id

from bigcommerce.api import BigcommerceApi

LOGGER = logging.getLogger(__name__)
# _ = translation.ugettext

Expand Down
6 changes: 3 additions & 3 deletions lms/djangoapps/bigcommerce_app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

from opaque_keys.edx.keys import CourseKey

import bigcommerce.api as bigcommerce_client
from bigcommerce.resources.products import ProductCustomFields

from common.djangoapps.student.models import CourseEnrollment

from openedx.core.djangolib.markup import HTML
Expand All @@ -20,9 +23,6 @@
StoreCustomerPlatformUser
)

import bigcommerce.api as bigcommerce_client
from bigcommerce.resources.products import ProductCustomFields

LOGGER = logging.getLogger(__name__)


Expand Down

0 comments on commit e649339

Please sign in to comment.