|
|
@@ -11,6 +11,11 @@ from typing import Any, List, Tuple, Type, cast
|
|
|
|
|
|
import sphinx
|
|
|
|
|
|
+# Require at least Sphinx 2.x.
|
|
|
+# flake8 issues E402 for imports after this, but the purpose of this
|
|
|
+# check is to fail more clearly if the imports below will fail.
|
|
|
+assert sphinx.version_info >= (2,)
|
|
|
+
|
|
|
from docutils.utils.code_analyzer import Lexer, LexerError
|
|
|
from docutils.parsers.rst import Directive, directives
|
|
|
from docutils.transforms import Transform
|
|
|
@@ -110,9 +115,6 @@ CMakeLexer.tokens["root"] = [
|
|
|
|
|
|
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
-# Require at least Sphinx 2.x.
|
|
|
-assert sphinx.version_info >= (2,)
|
|
|
-
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
# RE to split multiple command signatures.
|