qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4 00/13] qapi: static typing conversion, pt5b


From: John Snow
Subject: [PATCH v4 00/13] qapi: static typing conversion, pt5b
Date: Thu, 30 Sep 2021 16:57:03 -0400

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]