From eb7d2d1c23440cc9c035b6d1c0131ddd22c52a1e Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Mon, 7 Oct 2024 12:02:47 +0530 Subject: [PATCH] fix: lint issues --- openedx/core/djangoapps/content_libraries/api.py | 2 +- openedx/core/djangoapps/content_libraries/views.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openedx/core/djangoapps/content_libraries/api.py b/openedx/core/djangoapps/content_libraries/api.py index 8494e0cad336..11b720bbb970 100644 --- a/openedx/core/djangoapps/content_libraries/api.py +++ b/openedx/core/djangoapps/content_libraries/api.py @@ -1243,7 +1243,7 @@ def set_library_component_collections( created_by: int | None = None, # As an optimization, callers may pass in a pre-fetched ContentLibrary instance content_library: ContentLibrary | None = None, -) -> Collection: +) -> Component: """ It Associates the component with collections for the given collection keys. diff --git a/openedx/core/djangoapps/content_libraries/views.py b/openedx/core/djangoapps/content_libraries/views.py index 352ec6cc7888..f81c977b7765 100644 --- a/openedx/core/djangoapps/content_libraries/views.py +++ b/openedx/core/djangoapps/content_libraries/views.py @@ -655,8 +655,11 @@ def patch(self, request, usage_key_str) -> Response: Collection and Components must all be part of the given library/learning package. """ key = LibraryUsageLocatorV2.from_string(usage_key_str) - content_library = api.require_permission_for_library_key(key.lib_key, request.user, - permissions.CAN_EDIT_THIS_CONTENT_LIBRARY) + content_library = api.require_permission_for_library_key( + key.lib_key, + request.user, + permissions.CAN_EDIT_THIS_CONTENT_LIBRARY + ) component = api.get_component_from_usage_key(key) serializer = ContentLibraryComponentCollectionsUpdateSerializer(data=request.data) serializer.is_valid(raise_exception=True)