Skip to content

Commit

Permalink
more clarity in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ofloveandhate committed Jul 19, 2024
1 parent 9b85ee9 commit 50b249f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions markdown2canvas/canvas_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

def find_local_images(html):
"""
constructs a map of local url's : Images
returns a dictionary of local url's to markdown2canvas.Images
works by assuming that local url's don't start with http or https, as those should be online.
"""
from bs4 import BeautifulSoup

Expand All @@ -56,7 +58,7 @@ def find_local_images(html):

def find_local_files(html):
"""
constructs a list of BareFiles, so that they can later be replaced with a url to a canvas thing
constructs a dictionary of markdown2canvas.BareFiles, so that they can later be replaced with a url to a canvas thing after upload
"""
from bs4 import BeautifulSoup

Expand Down Expand Up @@ -241,17 +243,17 @@ def publish_linked_content_and_adjust_html(self,course,overwrite=False):

def _construct_dict_of_props(self):
"""
construct a dictionary of properties, such that it can be used to `edit` a canvas object.
construct an empty dictionary of properties, such that it can be used to `edit` a canvas object.
"""
d = {}
return d


def ensure_in_modules(self, course):
"""
makes sure this item is listed in the Module on Canvas. If it's not, it's added to the bottom. There's not currently any way to control order.
makes sure this item is listed in the Modules listed (by name) in self.modules, on Canvas. If it's not, it's added to the bottom. There's not currently any way to control order.
If the item doesn't already exist, this function will raise. Be sure to actually publish the content first.
If the item doesn't already exist, this function will raise `DoesntExist`. Be sure to actually publish the content first.
"""

if not self.canvas_obj:
Expand Down

0 comments on commit 50b249f

Please sign in to comment.