qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] qapi: static typing conversion, pt4
@ 2020-09-22 21:21 John Snow
  2020-09-22 21:21 ` [PATCH 1/6] qapi/error.py: refactor error classes John Snow
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: John Snow @ 2020-09-22 21:21 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Michael Roth, qemu-devel, John Snow, Eduardo Habkost, Cleber Rosa

based-on: <20200922211802.4083666-1-jsnow@redhat.com>
          [PATCH 00/14] qapi: static typing conversion, pt3

Hi, this series adds static type hints to the QAPI module.
This is part four!

Part 4: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt4
Everything: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt6

- Requires Python 3.6+
- Requires mypy 0.770 or newer (for type analysis only)
- Requires pylint 2.6.0 or newer (for lint checking only)

This part of the series focuses on error.py.

Type hints are added in patches that add *only* type hints and change no
other behavior. Any necessary changes to behavior to accommodate typing
are split out into their own tiny patches.

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

John Snow (6):
  qapi/error.py: refactor error classes
  qapi/parser.py: remove parser context from QAPIDoc
  qapi/error.py: move QAPIParseError to parser.py
  qapi/parser.py: refactor QAPIParseError
  qapi/error.py: enable mypy checks
  qapi/error.py: enable pylint checks

 scripts/qapi/error.py  |  41 +++++++-------
 scripts/qapi/main.py   |   2 +-
 scripts/qapi/mypy.ini  |   5 --
 scripts/qapi/parser.py | 120 ++++++++++++++++++++++++-----------------
 scripts/qapi/pylintrc  |   3 +-
 scripts/qapi/schema.py |   4 +-
 6 files changed, 94 insertions(+), 81 deletions(-)

-- 
2.26.2




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

end of thread, other threads:[~2020-09-22 22:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-22 21:21 [PATCH 0/6] qapi: static typing conversion, pt4 John Snow
2020-09-22 21:21 ` [PATCH 1/6] qapi/error.py: refactor error classes John Snow
2020-09-22 21:21 ` [PATCH 2/6] qapi/parser.py: remove parser context from QAPIDoc John Snow
2020-09-22 21:21 ` [PATCH 3/6] qapi/error.py: move QAPIParseError to parser.py John Snow
2020-09-22 21:21 ` [PATCH 4/6] qapi/parser.py: refactor QAPIParseError John Snow
2020-09-22 21:21 ` [PATCH 5/6] qapi/error.py: enable mypy checks John Snow
2020-09-22 21:21 ` [PATCH 6/6] qapi/error.py: enable pylint checks 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).