Skip to content

Commit

Permalink
syle: Nits on the code
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChV committed Oct 18, 2024
1 parent 7a1797a commit 9fe57ef
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cms/djangoapps/contentstore/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ def _import_xml_node_to_parent(
Given an XML node representing a serialized XBlock (OLX), import it into modulestore 'store' as a child of the
specified parent block. Recursively copy children as needed.
"""
# pylint: disable=too-many-statements

runtime = parent_xblock.runtime
parent_key = parent_xblock.scope_ids.usage_id
block_type = node.tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,8 @@ def test_paste_from_library_read_only_tags(self):
}, format="json")
assert paste_response.status_code == 200


new_block_key = paste_response.json()["locator"]

object_tags = tagging_api.get_object_tags(new_block_key)
assert len(object_tags) == len(self.lib_block_tags)
for object_tag in object_tags:
Expand Down
3 changes: 2 additions & 1 deletion cms/lib/xblock/upstream_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
if t.TYPE_CHECKING:
from django.contrib.auth.models import User # pylint: disable=imported-auth-user


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -298,7 +299,7 @@ def _update_tags(*, upstream: XBlock, downstream: XBlock) -> None:
)
else:
copy_object_tags(upstream.location, downstream.location)


def _get_synchronizable_fields(upstream: XBlock, downstream: XBlock) -> set[str]:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ def test_get_copied_tags(self):
object_id_2 = str(self.courseB)
tagging_api.tag_object(object_id=object_id_1, taxonomy=self.t1, tags=["android"])
tagging_api.tag_object(object_id=object_id_2, taxonomy=self.t1, tags=["anvil"])
tagging_api.copy_tags(object_id_1, object_id_2)
tagging_api.copy_tags_as_read_only(object_id_1, object_id_2)

expected_tags = [{
'name': self.t1.name,
Expand Down

0 comments on commit 9fe57ef

Please sign in to comment.