Skip to content

Commit

Permalink
style: pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVZ96 committed Nov 25, 2023
1 parent 42c2037 commit b4a4c96
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cms/djangoapps/contentstore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,12 @@ def duplicate_block(

if not children_handled:
handle_children_duplication(
dest_block, store, source_item, store, user, duplication_function=duplicate_block, shallow=shallow
dest_block,
source_item,
store,
user,
duplication_function=duplicate_block,
shallow=shallow,
)

# pylint: disable=protected-access
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
from openedx.core.lib.cache_utils import request_cached
from openedx.core.toggles import ENTRANCE_EXAMS
from xmodule.course_block import DEFAULT_START_DATE
from xmodule.library_tools import LibraryToolsService
from xmodule.modulestore import EdxJSONEncoder, ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.draft_and_published import DIRECT_ONLY_CATEGORIES
Expand Down
1 change: 0 additions & 1 deletion xmodule/library_content_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import random
from copy import copy
from gettext import ngettext, gettext
from typing import Callable

import bleach
from django.conf import settings
Expand Down
4 changes: 4 additions & 0 deletions xmodule/util/duplicate.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
"""
Utility to aid xblock duplication
"""
from typing import Callable


def handle_children_duplication(
xblock, source_item, store, user, duplication_function: Callable[..., None], shallow: bool
):
"""Implements default behaviour to handle children duplication."""
if not source_item.has_children or shallow:
return

Expand Down

0 comments on commit b4a4c96

Please sign in to comment.