changeset 68:93ade4c595b7

Reorg conf.py: import globally
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 28 Apr 2026 15:21:03 +0200
parents 3ccfa7f45044
children b3dd247b27a5
files docs/conf.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/docs/conf.py	Tue Apr 28 15:16:06 2026 +0200
+++ b/docs/conf.py	Tue Apr 28 15:21:03 2026 +0200
@@ -12,6 +12,9 @@
 
 sys.path.insert(0, os.path.dirname(os.path.abspath('.')))
 
+from pygments_lexer_pseudocode2.algpseudocode import AlgPseudocodeLexer
+
+
 # -- Project information -----------------------------------------------------
 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
 
@@ -58,9 +61,9 @@
 
 
 def setup(app):
+    #
     # Add a custom lexer: AlgPseudocodeLexer with custom init option "no_end"
-    from pygments_lexer_pseudocode2.algpseudocode import AlgPseudocodeLexer
-
     # Given lexer must be callable: also use an indirection with "partial"
+    #
     app.add_lexer("NoEndAlgPseudocode",
                   functools.partial(AlgPseudocodeLexer, no_end=True))