All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/13] qapi: static typing conversion, pt5b
@ 2021-09-29 19:44 John Snow
  2021-09-29 19:44 ` [PATCH v3 01/13] qapi/pylintrc: ignore 'consider-using-f-string' warning John Snow
                   ` (13 more replies)
  0 siblings, 14 replies; 23+ messages in thread
From: John Snow @ 2021-09-29 19:44 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/379678153
    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/`

V3:

001/13:[down] 'qapi/pylintrc: ignore 'consider-using-f-string' warning'
002/13:[down] 'qapi/gen: use dict.items() to iterate over _modules'
003/13:[----] [--] 'qapi/parser: fix unused check_args_section arguments'
004/13:[down] 'qapi: Add spaces after symbol declaration for consistency'
005/13:[down] 'qapi/parser: improve detection of '@symbol:' preface'
006/13:[down] 'qapi/parser: remove FIXME comment from _append_body_line'
007/13:[down] 'qapi/parser: Simplify _end_section()'
008/13:[down] 'qapi/parser: Introduce NullSection'
009/13:[down] 'qapi/parser: add import cycle workaround'
010/13:[0028] [FC] 'qapi/parser: add type hint annotations (QAPIDoc)'
011/13:[----] [--] 'qapi/parser: enable mypy checks'
012/13:[0003] [FC] 'qapi/parser: Silence too-few-public-methods warning'
013/13:[----] [--] 'qapi/parser: enable pylint checks'

- Rebased.
- Add patches 1 & 2 for newer pylint versions
- Add patches 4-6 because I was in the neighborhood
- Patches 7 & 8 rewritten from the corpse of the prior fix/workaround
- Patch 9 split out separately from what is now patch 10
- Update patch 12 to accommodate new 7/8

Notes:
- Patches 4-6 aren't crucial and can be omitted from staging if it makes
  the difference between a respin or not. I think I will definitely want
  patches 5-6 eventually anyway, though. (Or something to replace 'em.)
- Patch 10 and 11 can be squashed, if desired

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: improve detection of '@symbol:' preface
  qapi/parser: remove FIXME comment from _append_body_line
  qapi/parser: Simplify _end_section()
  qapi/parser: Introduce NullSection
  qapi/parser: add import cycle workaround
  qapi/parser: add type hint annotations (QAPIDoc)
  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                        | 161 +++++++++++-------
 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 +
 .../doc-whitespace-leading-symbol.err         |   1 +
 .../doc-whitespace-leading-symbol.json        |   6 +
 .../doc-whitespace-leading-symbol.out         |   0
 .../doc-whitespace-trailing-symbol.err        |   1 +
 .../doc-whitespace-trailing-symbol.json       |   6 +
 .../doc-whitespace-trailing-symbol.out        |   0
 tests/qapi-schema/meson.build                 |   2 +
 16 files changed, 134 insertions(+), 71 deletions(-)
 create mode 100644 tests/qapi-schema/doc-whitespace-leading-symbol.err
 create mode 100644 tests/qapi-schema/doc-whitespace-leading-symbol.json
 create mode 100644 tests/qapi-schema/doc-whitespace-leading-symbol.out
 create mode 100644 tests/qapi-schema/doc-whitespace-trailing-symbol.err
 create mode 100644 tests/qapi-schema/doc-whitespace-trailing-symbol.json
 create mode 100644 tests/qapi-schema/doc-whitespace-trailing-symbol.out

-- 
2.31.1




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

end of thread, other threads:[~2021-09-30 17:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 19:44 [PATCH v3 00/13] qapi: static typing conversion, pt5b John Snow
2021-09-29 19:44 ` [PATCH v3 01/13] qapi/pylintrc: ignore 'consider-using-f-string' warning John Snow
2021-09-29 19:44 ` [PATCH v3 02/13] qapi/gen: use dict.items() to iterate over _modules John Snow
2021-09-29 19:44 ` [PATCH v3 03/13] qapi/parser: fix unused check_args_section arguments John Snow
2021-09-29 19:44 ` [PATCH v3 04/13] qapi: Add spaces after symbol declaration for consistency John Snow
2021-09-29 19:44 ` [PATCH v3 05/13] qapi/parser: improve detection of '@symbol:' preface John Snow
2021-09-30  8:42   ` Markus Armbruster
2021-09-30 17:43     ` John Snow
2021-09-29 19:44 ` [PATCH v3 06/13] qapi/parser: remove FIXME comment from _append_body_line John Snow
2021-09-30  8:47   ` Markus Armbruster
2021-09-30 17:20     ` John Snow
2021-09-29 19:44 ` [PATCH v3 07/13] qapi/parser: Simplify _end_section() John Snow
2021-09-29 19:44 ` [PATCH v3 08/13] qapi/parser: Introduce NullSection John Snow
2021-09-30  9:34   ` Markus Armbruster
2021-09-30 16:59     ` John Snow
2021-09-29 19:44 ` [PATCH v3 09/13] qapi/parser: add import cycle workaround John Snow
2021-09-30  9:45   ` Markus Armbruster
2021-09-30 17:11     ` John Snow
2021-09-29 19:44 ` [PATCH v3 10/13] qapi/parser: add type hint annotations (QAPIDoc) John Snow
2021-09-29 19:44 ` [PATCH v3 11/13] qapi/parser: enable mypy checks John Snow
2021-09-29 19:44 ` [PATCH v3 12/13] qapi/parser: Silence too-few-public-methods warning John Snow
2021-09-29 19:44 ` [PATCH v3 13/13] qapi/parser: enable pylint checks John Snow
2021-09-30 10:08 ` [PATCH v3 00/13] qapi: static typing conversion, pt5b Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.