Skip to content

Commit 592880d

Browse files
committed
style: Run ruff check --fix --select I to fix isort issues.
While we had isort configured it was actually not running in CI and so a lot of isort issues were ignored.
1 parent 2ab4695 commit 592880d

File tree

2,075 files changed

+6707
-4586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,075 files changed

+6707
-4586
lines changed

cms/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# FWIW, this is identical behavior to what happens in Kombu if pkg_resources
1717
# isn't available.
1818
import kombu.utils
19+
20+
1921
kombu.utils.entrypoints = lambda namespace: iter([])
2022

2123
# This will make sure the app is always imported when Django starts so

cms/celery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Patch the xml libs before anything else.
1111
from openedx.core.lib.safe_lxml import defuse_xml_libs
1212

13+
1314
defuse_xml_libs()
1415

1516

cms/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from openedx.core.pytest_hooks import DeferPlugin
1414

15+
1516
# Patch the xml libs before anything else.
1617
from openedx.core.lib.safe_lxml import defuse_xml_libs # isort:skip
1718
defuse_xml_libs()

cms/djangoapps/api/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"""
44

55

6-
from django.urls import include
7-
from django.urls import path
6+
from django.urls import include, path
7+
88

99
app_name = 'cms.djangoapps.api'
1010

cms/djangoapps/api/v1/serializers/course_runs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from openedx.core.lib.courses import course_image_url
1616
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
1717

18+
1819
IMAGE_TYPES = {
1920
'image/jpeg': 'jpg',
2021
'image/png': 'png',

cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33

44
import datetime
5+
56
import ddt
67
import pytz
78
from django.test import RequestFactory
89

910
from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole
1011
from common.djangoapps.student.tests.factories import UserFactory
1112
from openedx.core.lib.courses import course_image_url
12-
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
13+
from xmodule.modulestore.tests.django_utils import (
14+
ModuleStoreTestCase, # lint-amnesty, pylint: disable=wrong-import-order
15+
)
1316
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
1417

1518
from ...serializers.course_runs import CourseRunSerializer

cms/djangoapps/api/v1/tests/test_views/test_course_runs.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@
2020
from xmodule.contentstore.django import contentstore # lint-amnesty, pylint: disable=wrong-import-order
2121
from xmodule.exceptions import NotFoundError # lint-amnesty, pylint: disable=wrong-import-order
2222
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
23-
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
24-
from xmodule.modulestore.tests.factories import CourseFactory, ToyCourseFactory # lint-amnesty, pylint: disable=wrong-import-order
23+
from xmodule.modulestore.tests.django_utils import (
24+
ModuleStoreTestCase, # lint-amnesty, pylint: disable=wrong-import-order
25+
)
26+
from xmodule.modulestore.tests.factories import ( # lint-amnesty, pylint: disable=wrong-import-order
27+
CourseFactory,
28+
ToyCourseFactory,
29+
)
2530

2631
from ...serializers.course_runs import CourseRunSerializer
2732
from ..utils import serialize_datetime

cms/djangoapps/api/v1/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from .views.course_runs import CourseRunViewSet
99

10+
1011
app_name = 'cms.djangoapps.api.v1'
1112

1213
router = DefaultRouter()

cms/djangoapps/api/v1/views/course_runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
CourseRunCreateSerializer,
1616
CourseRunImageSerializer,
1717
CourseRunRerunSerializer,
18-
CourseRunSerializer
18+
CourseRunSerializer,
1919
)
2020

2121

cms/djangoapps/cms_user_tasks/signals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from .tasks import send_task_complete_email
1818

19+
1920
LOGGER = logging.getLogger(__name__)
2021
LIBRARY_CONTENT_TASK_NAME_TEMPLATE = 'updating .*type@library_content.* from library'
2122
LIBRARY_IMPORT_TASK_NAME_TEMPLATE = '(.*)?migrate_from_modulestore'

0 commit comments

Comments
 (0)