Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sphinxcontrib/mat_documenters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,11 @@ def add_directive_header(self, sig):
MatlabDocumenter.add_directive_header(self, sig)

# add inheritance info, if wanted
if not self.doc_as_attr and self.options.show_inheritance:
if (
isinstance(self.object, MatClass)
and not self.doc_as_attr
and self.options.show_inheritance
):
self.add_line("", "<autodoc>")
base_class_links = make_baseclass_links(self.env, self.object)
if base_class_links:
Expand Down
5 changes: 4 additions & 1 deletion sphinxcontrib/mat_tree_sitter_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,10 @@ def _parse_argument_section(self, argblock_node):
# might be a good idea to extract common code here.
for arg in arguments:
# match property to extract details
_, arg_match = q_arg.matches(arg)[0]
q_arg_matches = q_arg.matches(arg)
if not q_arg_matches:
continue
_, arg_match = q_arg_matches[0]

# extract name (this is always available so no need for None check)
name = [
Expand Down
Loading