Browse Source

Merge pull request #3268 from akien-mga/black-format-regression

conf.py: Fix regression from black formatting in #3229
Rémi Verschelde 5 years ago
parent
commit
966fd002ed
1 changed files with 7 additions and 2 deletions
  1. 7 2
      conf.py

+ 7 - 2
conf.py

@@ -5,8 +5,6 @@
 import sphinx_rtd_theme
 import sys
 import os
-from gdscript import GDScriptLexer
-from sphinx.highlighting import lexers
 
 # -- General configuration ------------------------------------------------
 
@@ -51,8 +49,15 @@ is_i18n = tags.has("i18n")  # noqa: F821
 
 exclude_patterns = ["_build"]
 
+# fmt: off
+# These imports should *not* be moved to the start of the file,
+# they depend on the sys.path.append call registering "extensions".
 # GDScript syntax highlighting
+from gdscript import GDScriptLexer
+from sphinx.highlighting import lexers
+
 lexers["gdscript"] = GDScriptLexer()
+# fmt: on
 
 # Pygments (syntax highlighting) style to use
 pygments_style = "sphinx"