qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/6] python: add QAPI and qapidoc et al to python tests
@ 2025-06-04 20:03 John Snow
  2025-06-04 20:03 ` [PATCH v5 1/6] qapi: Add some pylint ignores John Snow via
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: John Snow @ 2025-06-04 20:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Michael Roth, Cleber Rosa, Peter Maydell,
	Markus Armbruster

Hiya, this series turns on automated linting for scripts/qapi,
docs/sphinx/qapidoc.py and docs/sphinx/qapi_domain.py.

This includes flake8/isort/pylint/mypy for scripts/qapi, but omits mypy
from the Sphinx plugins owing to my inability to strictly type the
extensions given the wide versions of Sphinx we actually support.

[Maybe this will change soon, but it's not true just yet.]

Though I have been using black in my own development, I have not yet
enabled it anywhere automatically. Maybe soon.

V5:
  - Fixed test failure on GitLab CI. As far as I can tell, the problem
    stems from Sphinx requiring a version of `packaging` that is old
    enough that some newer versions of setuptools break when it is
    installed. Fix this by pinning setuptools to an older version, for
    now. Note that this only applies to the "minreqs" test and not
    general installation.

    (This change applies only to patch 4/6.)

    (Note that I am still carrying a patch to bump the Sphinx version,
    but I wanted to get this series out of the way first... I'll revisit
    this pinning again shortly.)

V4:
 - Rebase and resend. Pull Request imminent.

V3:
 - Folded in Markus's commit to clean up setup.cfg.

V2:
 - Mostly commit message updates based on Markus's's's review.

John Snow (5):
  qapi: Add some pylint ignores
  docs/qapidoc: linting fixes
  python: update missing dependencies from minreqs
  python: add qapi static analysis tests
  qapi: delete un-needed python static analysis configs

Markus Armbruster (1):
  python: Drop redundant warn_unused_configs = True

 docs/sphinx/qapi_domain.py  | 25 ++++++++++++++-----------
 docs/sphinx/qapidoc.py      |  5 +++--
 python/setup.cfg            |  2 +-
 python/tests/minreqs.txt    | 31 +++++++++++++++++++++++++++++++
 python/tests/qapi-flake8.sh |  6 ++++++
 python/tests/qapi-isort.sh  |  8 ++++++++
 python/tests/qapi-mypy.sh   |  4 ++++
 python/tests/qapi-pylint.sh |  8 ++++++++
 scripts/qapi/.flake8        |  3 ---
 scripts/qapi/.isort.cfg     |  7 -------
 scripts/qapi/backend.py     |  2 ++
 scripts/qapi/mypy.ini       |  4 ----
 scripts/qapi/pylintrc       |  1 +
 13 files changed, 78 insertions(+), 28 deletions(-)
 create mode 100755 python/tests/qapi-flake8.sh
 create mode 100755 python/tests/qapi-isort.sh
 create mode 100755 python/tests/qapi-mypy.sh
 create mode 100755 python/tests/qapi-pylint.sh
 delete mode 100644 scripts/qapi/.flake8
 delete mode 100644 scripts/qapi/.isort.cfg
 delete mode 100644 scripts/qapi/mypy.ini

-- 
2.48.1




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-06-05 16:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04 20:03 [PATCH v5 0/6] python: add QAPI and qapidoc et al to python tests John Snow
2025-06-04 20:03 ` [PATCH v5 1/6] qapi: Add some pylint ignores John Snow via
2025-06-04 20:03 ` [PATCH v5 2/6] docs/qapidoc: linting fixes John Snow
2025-06-04 20:03 ` [PATCH v5 3/6] python: update missing dependencies from minreqs John Snow
2025-06-04 20:03 ` [PATCH v5 4/6] python: add qapi static analysis tests John Snow
2025-06-05  6:30   ` Markus Armbruster
2025-06-05  6:33   ` Markus Armbruster
2025-06-05  8:36     ` Daniel P. Berrangé
2025-06-05 16:02       ` John Snow
2025-06-04 20:03 ` [PATCH v5 5/6] python: Drop redundant warn_unused_configs = True John Snow
2025-06-04 20:03 ` [PATCH v5 6/6] qapi: delete un-needed python static analysis configs John Snow
2025-06-05  6:35 ` [PATCH v5 0/6] python: add QAPI and qapidoc et al to python tests Markus Armbruster
2025-06-05 16:00   ` John Snow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).