mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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
This commit is contained in:
parent
dc955052b4
commit
a738817c1d
2 changed files with 17 additions and 13 deletions
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue