diff options
| author | John Snow <jsnow@redhat.com> | 2025-06-04 16:03:50 -0400 |
|---|---|---|
| committer | John Snow <jsnow@redhat.com> | 2025-06-05 12:08:53 -0400 |
| commit | a738817c1ddb1730cf144e444d367b5d37e4a4dd (patch) | |
| tree | bb3d1bad52c929107e134d2c0cceb979a2cc0e03 /docs/sphinx/qapidoc.py | |
| parent | dc955052b400572dcfed896532d2b0dcf9d111f5 (diff) | |
| download | focaccia-qemu-a738817c1ddb1730cf144e444d367b5d37e4a4dd.tar.gz focaccia-qemu-a738817c1ddb1730cf144e444d367b5d37e4a4dd.zip | |
docs/qapidoc: linting fixes
This restores the linting baseline in qapidoc. The order of some imports change slightly here due to configuring isort a little better: previously, isort was having difficulty understanding that "compat" and "qapidoc_legacy" were local modules because docs/sphinx "isn't a python package". Configuring this manually, isort chooses a different import ordering, which _is_ intentional here. Also: extra ignores are added for pylint. The most recent versions of pylint don't require these ignores, but the oldest versions we support do, so in the extra ignores go. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 20250604200354.459501-3-jsnow@redhat.com
Diffstat (limited to 'docs/sphinx/qapidoc.py')
| -rw-r--r-- | docs/sphinx/qapidoc.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 661b2c4ed0..8011ac9efa 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -27,6 +27,7 @@ https://www.sphinx-doc.org/en/master/development/index.html from __future__ import annotations + __version__ = "2.0" from contextlib import contextmanager @@ -56,8 +57,6 @@ from qapi.schema import ( QAPISchemaVisitor, ) from qapi.source import QAPISourceInfo - -from qapidoc_legacy import QAPISchemaGenRSTVisitor # type: ignore from sphinx import addnodes from sphinx.directives.code import CodeBlock from sphinx.errors import ExtensionError @@ -65,6 +64,8 @@ from sphinx.util import logging from sphinx.util.docutils import SphinxDirective, switch_source_input from sphinx.util.nodes import nested_parse_with_titles +from qapidoc_legacy import QAPISchemaGenRSTVisitor # type: ignore + if TYPE_CHECKING: from typing import ( |