From 3adfbabf0df31893edb12d16ec5c4512fac46a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Montilla?= Date: Tue, 21 May 2024 20:13:03 +0000 Subject: [PATCH] feat: Improve docstrings --- openedx_lti_tool_plugin/deep_linking/forms.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openedx_lti_tool_plugin/deep_linking/forms.py b/openedx_lti_tool_plugin/deep_linking/forms.py index c37a429..14a2c05 100644 --- a/openedx_lti_tool_plugin/deep_linking/forms.py +++ b/openedx_lti_tool_plugin/deep_linking/forms.py @@ -15,7 +15,9 @@ class DeepLinkingForm(forms.Form): """Deep Linking Form.""" def __init__(self, *args: tuple, request=None, **kwargs: dict): - """Initialize class attributes. + """Class __init__ method. + + Initialize class instance attributes and add `content_items` field. Args: *args: Variable length argument list. @@ -71,11 +73,14 @@ def get_content_items_choice(self, course, request: HttpRequest) -> Tuple[str, s ) def get_deep_link_resources(self) -> Set[Optional[DeepLinkResource]]: - """Get set of `DeepLinkResource` from cleaned `content_items` field. + """Get DeepLinkResource objects from this form `cleaned_data` attribute. Returns: Set of DeepLinkResource objects or an empty set + .. _LTI 1.3 Advantage Tool implementation in Python - LTI Message Launches: + https://github.com/dmitry-viskov/pylti1.3?tab=readme-ov-file#deep-linking-responses + """ return { DeepLinkResource().set_url(content_item)