[lldb] [llvm] [Docs] Use cacheable myst_heading_slug_func value (PR #104847)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 13:09:42 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Scott Linder (slinder1)

<details>
<summary>Changes</summary>

Avoid creating an uncacheable conf variable by using a string instead of
a function reference. Also has the effect of avoiding triggering the
"config.cache" sphinx warning.

Requires myst_parser 0.19.0 (specifically
https://github.com/executablebooks/MyST-Parser/pull/696) which is over a
year old by now. Do we mandate any minimum version for these
dependencies?


---
Full diff: https://github.com/llvm/llvm-project/pull/104847.diff


2 Files Affected:

- (modified) lldb/docs/conf.py (+1-3) 
- (modified) llvm/docs/conf.py (+1-3) 


``````````diff
diff --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index 50f4ab84f1ca66..79cc37c8c45578 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -57,10 +57,8 @@
         raise
 
 # Automatic anchors for markdown titles
-from llvm_slug import make_slug
-
 myst_heading_anchors = 6
-myst_heading_slug_func = make_slug
+myst_heading_slug_func = "llvm_slug.make_slug"
 
 autodoc_default_options = {"special-members": True}
 
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
index 7f2ed5309606b5..a40da828ae2a25 100644
--- a/llvm/docs/conf.py
+++ b/llvm/docs/conf.py
@@ -40,10 +40,8 @@
         raise
 
 # Automatic anchors for markdown titles
-from llvm_slug import make_slug
-
 myst_heading_anchors = 6
-myst_heading_slug_func = make_slug
+myst_heading_slug_func = "llvm_slug.make_slug"
 
 
 # Add any paths that contain templates here, relative to this directory.

``````````

</details>


https://github.com/llvm/llvm-project/pull/104847


More information about the llvm-commits mailing list