summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2023-06-13 15:39:48 (GMT)
committerMatthew Woehlke <matthew.woehlke@kitware.com>2023-06-13 15:39:48 (GMT)
commit528cdc75519987a2004db94d1e7b0e445b1fb158 (patch)
tree54bac786a579513bd3bcdde13c72178353d24319
parent4bd1beded48dfa5150f13ed81df15035bce000d3 (diff)
downloadCMake-528cdc75519987a2004db94d1e7b0e445b1fb158.zip
CMake-528cdc75519987a2004db94d1e7b0e445b1fb158.tar.gz
CMake-528cdc75519987a2004db94d1e7b0e445b1fb158.tar.bz2
Utilities/Sphinx: Fix some flake8 gripes
Reorder some imports to better conform to what flake8 wants.
-rw-r--r--Utilities/Sphinx/cmake.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py
index e6c2266..0afd705 100644
--- a/Utilities/Sphinx/cmake.py
+++ b/Utilities/Sphinx/cmake.py
@@ -5,7 +5,6 @@
import os
import re
-
from dataclasses import dataclass
from typing import Any, List, Tuple, Type, cast
@@ -13,19 +12,19 @@ import sphinx
# The following imports may fail if we don't have Sphinx 2.x or later.
if sphinx.version_info >= (2,):
- from docutils.utils.code_analyzer import Lexer, LexerError
+ from docutils import io, nodes
+ from docutils.nodes import Element, Node, TextElement, system_message
from docutils.parsers.rst import Directive, directives
from docutils.transforms import Transform
- from docutils.nodes import Element, Node, TextElement, system_message
- from docutils import io, nodes
+ from docutils.utils.code_analyzer import Lexer, LexerError
+ from sphinx import addnodes
from sphinx.directives import ObjectDescription, nl_escape_re
from sphinx.domains import Domain, ObjType
from sphinx.roles import XRefRole
+ from sphinx.util import logging, ws_re
from sphinx.util.docutils import ReferenceRole
from sphinx.util.nodes import make_refnode
- from sphinx.util import logging, ws_re
- from sphinx import addnodes
else:
# Sphinx 2.x is required.
assert sphinx.version_info >= (2,)
@@ -47,10 +46,10 @@ else:
# - manual/cmake-buildsystem.7.html
# (with nested $<..>; relative and absolute paths, "::")
+from pygments.lexer import bygroups # noqa I100
from pygments.lexers import CMakeLexer
from pygments.token import (Comment, Name, Number, Operator, Punctuation,
String, Text, Whitespace)
-from pygments.lexer import bygroups
# Notes on regular expressions below:
# - [\.\+-] are needed for string constants like gtk+-2.0