Skip to content

Commit 2738924

Browse files
committed
wip
1 parent 0b29575 commit 2738924

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mkdocs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ plugins:
6161
show_symbol_type_toc: true
6262
show_symbol_type_heading: true
6363
extensions:
64-
- scripts/griffe_exts.py:DynamicDocstrings:
65-
ignore_paths:
66-
- pyslurm.constants.UNLIMITED
64+
- scripts/griffe_exts.py:DynamicDocstrings
6765

6866
markdown_extensions:
6967
- admonition

scripts/griffe_exts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ def on_instance(
9797
if not docstring or not obj.docstring:
9898
return
9999

100-
# Update the object instance with the evaluated docstring.
101100
fmt_docstring = pattern.sub(replace_with_slurm_docs_url, docstring)
101+
if fmt_docstring == docstring:
102+
# No need to update the docstring if nothing has changed
103+
return
104+
102105
docstring = inspect.cleandoc(fmt_docstring)
103106
obj.docstring.value = docstring

0 commit comments

Comments
 (0)