qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/13] qapi: static typing conversion, pt5b
@ 2021-09-30 20:57 John Snow
  2021-09-30 20:57 ` [PATCH v4 01/13] qapi/pylintrc: ignore 'consider-using-f-string' warning John Snow
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: John Snow @ 2021-09-30 20:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Michael Roth, Markus Armbruster, Eric Blake,
	Cleber Rosa, John Snow

Hello darkness my old friend; This is part five (b), and focuses on
QAPIDoc in parser.py.

GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-qapi-cleanup-pt5b
CI: https://gitlab.com/jsnow/qemu/-/pipelines/380464863
    Note: intentional trailing whitespace in a QAPI schema test causes
    a warning on the `check-patch` CI test. Ignore it.

Requirements:
- Python 3.6+
- mypy >= 0.770
- pylint >= 2.6.0 (2.7.0+ when using Python 3.9+)

Every commit should pass with:
 - `isort -c qapi/`
 - `flake8 qapi/`
 - `pylint --rcfile=qapi/pylintrc qapi/`
 - `mypy --config-file=qapi/mypy.ini qapi/`

V4:

005/13:[0006] [FC] 'qapi/parser: remove FIXME comment from _append_body_line'
006/13:[down] 'qapi/parser: clarify _end_section() logic'
007/13:[0004] [FC] 'qapi/parser: Introduce NullSection'
010/13:[down] 'qapi/parser: Add FIXME for consolidating JSON-related types'

- Dropped formerly-patch-05, for now.
- Added a new FIXME comment to keep myself honest for pt5c O:-)
- (05) Adjusted a commend and the parser error message
- (06) Changed commit title for 06 ("simplify" => "clarify")
- (07) Adjust comment.

John Snow (13):
  qapi/pylintrc: ignore 'consider-using-f-string' warning
  qapi/gen: use dict.items() to iterate over _modules
  qapi/parser: fix unused check_args_section arguments
  qapi: Add spaces after symbol declaration for consistency
  qapi/parser: remove FIXME comment from _append_body_line
  qapi/parser: clarify _end_section() logic
  qapi/parser: Introduce NullSection
  qapi/parser: add import cycle workaround
  qapi/parser: add type hint annotations (QAPIDoc)
  qapi/parser: Add FIXME for consolidating JSON-related types
  qapi/parser: enable mypy checks
  qapi/parser: Silence too-few-public-methods warning
  qapi/parser: enable pylint checks

 qapi/block-core.json                   |   1 +
 qga/qapi-schema.json                   |   3 +
 scripts/qapi/gen.py                    |   3 +-
 scripts/qapi/mypy.ini                  |   5 -
 scripts/qapi/parser.py                 | 152 ++++++++++++++++---------
 scripts/qapi/pylintrc                  |   4 +-
 tests/qapi-schema/doc-bad-feature.err  |   2 +-
 tests/qapi-schema/doc-empty-symbol.err |   2 +-
 tests/qapi-schema/doc-good.json        |   8 ++
 9 files changed, 114 insertions(+), 66 deletions(-)

-- 
2.31.1




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

end of thread, other threads:[~2021-10-02  6:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 20:57 [PATCH v4 00/13] qapi: static typing conversion, pt5b John Snow
2021-09-30 20:57 ` [PATCH v4 01/13] qapi/pylintrc: ignore 'consider-using-f-string' warning John Snow
2021-09-30 20:57 ` [PATCH v4 02/13] qapi/gen: use dict.items() to iterate over _modules John Snow
2021-09-30 20:57 ` [PATCH v4 03/13] qapi/parser: fix unused check_args_section arguments John Snow
2021-10-01 14:11   ` Markus Armbruster
2021-10-01 18:55     ` John Snow
2021-09-30 20:57 ` [PATCH v4 04/13] qapi: Add spaces after symbol declaration for consistency John Snow
2021-09-30 20:57 ` [PATCH v4 05/13] qapi/parser: remove FIXME comment from _append_body_line John Snow
2021-09-30 20:57 ` [PATCH v4 06/13] qapi/parser: clarify _end_section() logic John Snow
2021-09-30 20:57 ` [PATCH v4 07/13] qapi/parser: Introduce NullSection John Snow
2021-09-30 20:57 ` [PATCH v4 08/13] qapi/parser: add import cycle workaround John Snow
2021-09-30 20:57 ` [PATCH v4 09/13] qapi/parser: add type hint annotations (QAPIDoc) John Snow
2021-09-30 20:57 ` [PATCH v4 10/13] qapi/parser: Add FIXME for consolidating JSON-related types John Snow
2021-09-30 20:57 ` [PATCH v4 11/13] qapi/parser: enable mypy checks John Snow
2021-09-30 20:57 ` [PATCH v4 12/13] qapi/parser: Silence too-few-public-methods warning John Snow
2021-09-30 20:57 ` [PATCH v4 13/13] qapi/parser: enable pylint checks John Snow
2021-10-01 14:11 ` [PATCH v4 00/13] qapi: static typing conversion, pt5b Markus Armbruster
2021-10-02  6:20   ` Markus Armbruster

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).