Skip to content

Commit 573d7f1

Browse files
committed
docs: update docstrings
1 parent 9e12bac commit 573d7f1

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

xblock/core.py

-2
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,6 @@ def parse_xml(cls, node, runtime, keys):
749749
will store its data.
750750
"""
751751
if is_pointer_tag(node):
752-
# new style:
753-
# read the actual definition file--named using url_name.replace(':','/')
754752
node, _ = load_definition_xml(node, runtime, keys.def_id)
755753

756754
block = runtime.construct_xblock_from_class(cls, keys)

xblock/utils/helpers.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,17 @@ def is_pointer_tag(xml_obj):
6363

6464
def load_definition_xml(node, runtime, def_id):
6565
"""
66-
Loads definition_xml stored in a dedicated file
66+
Parses and loads an XML definition file based on a given node, runtime
67+
environment, and definition ID.
68+
69+
Arguments:
70+
node: XML element containing attributes for definition loading.
71+
runtime: The runtime environment that provides resource access.
72+
def_id: Unique identifier for the definition being loaded.
73+
74+
Returns:
75+
tuple: A tuple containing the loaded XML definition and the
76+
corresponding file path.
6777
"""
6878
url_name = node.get('url_name')
6979
filepath = format_filepath(node.tag, name_to_pathname(url_name))
@@ -72,6 +82,9 @@ def load_definition_xml(node, runtime, def_id):
7282

7383

7484
def format_filepath(category, name):
85+
"""
86+
Construct a formatted filepath string based on the given category and name.
87+
"""
7588
return f'{category}/{name}.xml'
7689

7790

0 commit comments

Comments
 (0)