[flang-commits] [clang] [flang] [llvm] [Docs] Allow building man pages without myst_parser (PR #82402)

via flang-commits flang-commits at lists.llvm.org
Tue Feb 20 10:51:42 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 13e64958a00f9f47fc71027d5b6196906cbc2863...0cb108fa6552b112d5eeb9b82e4f57711fac4a35 clang/docs/conf.py flang/docs/conf.py llvm/docs/conf.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- clang/docs/conf.py	2024-02-20 18:44:06.000000 +0000
+++ clang/docs/conf.py	2024-02-20 18:51:35.488603 +0000
@@ -37,15 +37,16 @@
 
 # When building man pages, we do not use the markdown pages,
 # So, we can continue without the myst_parser dependencies.
 # Doing so reduces dependencies of some packaged llvm distributions.
 try:
-  import myst_parser
-  extensions.append("myst_parser")
+    import myst_parser
+
+    extensions.append("myst_parser")
 except ImportError:
-  if not tags.has("builder-man"):
-    raise
+    if not tags.has("builder-man"):
+        raise
 
 
 # The encoding of source files.
 # source_encoding = 'utf-8-sig'
 
--- flang/docs/conf.py	2024-02-20 18:44:06.000000 +0000
+++ flang/docs/conf.py	2024-02-20 18:51:35.521159 +0000
@@ -30,15 +30,16 @@
 
 # When building man pages, we do not use the markdown pages,
 # So, we can continue without the myst_parser dependencies.
 # Doing so reduces dependencies of some packaged llvm distributions.
 try:
-  import myst_parser
-  extensions.append("myst_parser")
+    import myst_parser
+
+    extensions.append("myst_parser")
 except ImportError:
-  if not tags.has("builder-man"):
-    raise
+    if not tags.has("builder-man"):
+        raise
 
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ["_templates"]
 myst_heading_anchors = 6
--- llvm/docs/conf.py	2024-02-20 18:44:06.000000 +0000
+++ llvm/docs/conf.py	2024-02-20 18:51:35.573436 +0000
@@ -30,15 +30,16 @@
 
 # When building man pages, we do not use the markdown pages,
 # So, we can continue without the myst_parser dependencies.
 # Doing so reduces dependencies of some packaged llvm distributions.
 try:
-  import myst_parser
-  extensions.append("myst_parser")
+    import myst_parser
+
+    extensions.append("myst_parser")
 except ImportError:
-  if not tags.has("builder-man"):
-    raise
+    if not tags.has("builder-man"):
+        raise
 
 # Automatic anchors for markdown titles
 from llvm_slug import make_slug
 
 myst_heading_anchors = 6

``````````

</details>


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


More information about the flang-commits mailing list