Skip to content

Commit

Permalink
feat: Improve docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
kuipumu committed May 21, 2024
1 parent 95ee206 commit 3adfbab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions openedx_lti_tool_plugin/deep_linking/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3adfbab

Please sign in to comment.