Skip to content

Commit 2318e2f

Browse files
feanilclaude
andcommitted
fix: apply ruff isort auto-fixes (trailing commas, backslash imports)
Mechanical changes produced by `ruff check --select I --fix .`: - adds trailing commas to multi-line import groups - converts backslash line continuations to parentheses Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f1d5f1c commit 2318e2f

754 files changed

Lines changed: 1751 additions & 1472 deletions

File tree

Some content is hidden

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
from common.djangoapps.student.roles import CourseInstructorRole, CourseStaffRole
1111
from common.djangoapps.student.tests.factories import UserFactory
1212
from openedx.core.lib.courses import course_image_url
13-
from xmodule.modulestore.tests.django_utils import \
14-
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+
)
1516
from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, pylint: disable=wrong-import-order
1617

1718
from ...serializers.course_runs import CourseRunSerializer

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
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 \
24-
ModuleStoreTestCase # 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+
)
2526
from xmodule.modulestore.tests.factories import ( # lint-amnesty, pylint: disable=wrong-import-order
2627
CourseFactory,
27-
ToyCourseFactory
28+
ToyCourseFactory,
2829
)
2930

3031
from ...serializers.course_runs import CourseRunSerializer

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/contentstore/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
ComponentLink,
1717
ContainerLink,
1818
LearningContextLinksStatus,
19-
VideoUploadConfig
19+
VideoUploadConfig,
2020
)
2121
from cms.djangoapps.contentstore.outlines_regenerate import CourseOutlineRegenerate
2222
from openedx.core.djangoapps.content.learning_sequences.api import key_supports_outlines

cms/djangoapps/contentstore/asset_storage_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
COURSES_CREATE_FILES,
2222
COURSES_DELETE_FILES,
2323
COURSES_EDIT_FILES,
24-
COURSES_VIEW_FILES
24+
COURSES_VIEW_FILES,
2525
)
2626
from openedx_filters.content_authoring.filters import LMSPageURLRequested
2727
from pymongo import ASCENDING, DESCENDING

cms/djangoapps/contentstore/core/course_optimizer_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
CourseLinkCheckTask,
1212
CourseLinkUpdateTask,
1313
LinkState,
14-
extract_content_URLs_from_course
14+
extract_content_URLs_from_course,
1515
)
1616
from cms.djangoapps.contentstore.utils import create_course_info_usage_key, get_previous_run_course_key
1717
from cms.djangoapps.contentstore.xblock_storage_handlers.view_handlers import get_xblock

cms/djangoapps/contentstore/core/tests/test_course_optimizer_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
_create_dto_recursive,
1212
_update_node_tree_and_dictionary,
1313
generate_broken_links_descriptor,
14-
sort_course_sections
14+
sort_course_sections,
1515
)
1616
from cms.djangoapps.contentstore.tasks import LinkState, extract_content_URLs_from_course
1717
from cms.djangoapps.contentstore.tests.utils import CourseTestCase

cms/djangoapps/contentstore/course_group_config.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,24 @@
1212
from cms.djangoapps.contentstore.utils import reverse_usage_url
1313
from common.djangoapps.util.db import MYSQL_MAX_INT, generate_int_id
1414
from lms.lib.utils import get_parent_unit
15+
1516
# Re-exported for backward compatibility - other modules import these from here
1617
from openedx.core.djangoapps.course_groups.constants import ( # pylint: disable=unused-import
1718
COHORT_SCHEME,
1819
CONTENT_GROUP_CONFIGURATION_DESCRIPTION,
1920
CONTENT_GROUP_CONFIGURATION_NAME,
2021
ENROLLMENT_SCHEME,
21-
RANDOM_SCHEME
22+
RANDOM_SCHEME,
2223
)
2324
from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_user_partition
2425
from xmodule.partitions.partitions import ( # lint-amnesty, pylint: disable=wrong-import-order
2526
MINIMUM_UNUSED_PARTITION_ID,
2627
ReadOnlyUserPartitionError,
27-
UserPartition
28+
UserPartition,
29+
)
30+
from xmodule.partitions.partitions_service import (
31+
get_all_partitions_for_course, # lint-amnesty, pylint: disable=wrong-import-order
2832
)
29-
from xmodule.partitions.partitions_service import \
30-
get_all_partitions_for_course # lint-amnesty, pylint: disable=wrong-import-order
3133
from xmodule.split_test_block import get_split_user_partitions # lint-amnesty, pylint: disable=wrong-import-order
3234

3335
MINIMUM_GROUP_ID = MINIMUM_UNUSED_PARTITION_ID

cms/djangoapps/contentstore/management/commands/replace_v1_lib_refs_with_v2_in_courses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from cms.djangoapps.contentstore.tasks import (
1313
replace_all_library_source_blocks_ids_for_course,
1414
undo_all_library_source_blocks_ids_for_course,
15-
validate_all_library_source_blocks_ids_for_course
15+
validate_all_library_source_blocks_ids_for_course,
1616
)
1717
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
1818

cms/djangoapps/contentstore/management/commands/tests/test_backfill_course_outlines.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
88
from openedx.core.djangoapps.content.learning_sequences.api import get_course_keys_with_outlines
9-
from xmodule.modulestore.tests.django_utils import \
10-
SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
9+
from xmodule.modulestore.tests.django_utils import (
10+
SharedModuleStoreTestCase, # lint-amnesty, pylint: disable=wrong-import-order
11+
)
1112
from xmodule.modulestore.tests.factories import ( # lint-amnesty, pylint: disable=wrong-import-order
1213
BlockFactory,
13-
CourseFactory
14+
CourseFactory,
1415
)
1516

1617
from ....outlines import update_outline_from_modulestore

0 commit comments

Comments
 (0)