qapi: static typing conversion, pt3
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 14 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
13 of 14 patches have a Reviewed-by or Acked-by.
| Patch | Eduardo Habkost |
|---|---|
| 1/14 | R-b |
| 2/14 | R-b |
| 3/14 | R-b |
| 4/14 | R-b |
| 5/14 | R-b |
| 6/14 | R-b |
| 7/14 | R-b |
| 8/14 | |
| 9/14 | R-b |
| 10/14 | R-b |
| 11/14 | R-b |
| 12/14 | R-b |
| 13/14 | R-b |
| 14/14 | T-b R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/14] qapi: static typing conversion, pt3
based-on: <[email protected]>
[PATCH 00/16] qapi: static typing conversion, pt2
Hi, this series adds static type hints to the QAPI module. This is part three!
Part 3: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt3
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 just doc.py ... which, err, Peter Maydell is getting rid of soon. Oh well. This is posted for reference; and simply as context and pre-requisite for later patches.
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 (14):
qapi/doc.py: stash long temporary locals in named locals qapi/doc.py: avoid unnecessary keyword arguments qapi/doc.py: Add assertion on section.member qapi/doc.py: assert correct types in member_func callbacks qapi/doc.py: Assert no suffix given for enum members qapi/doc.py: Add type hint annotations
qapi/doc.py: enable mypy checks
qapi/doc.py: Add generic texi_member callback qapi/doc.py: Remove one-letter variables qapi/gen.py: Add __bool__ dunder method to QAPIGen qapi/doc.py: Don't use private attributes of QAPIGen property qapi/doc.py: Assert tag member is Enum type qapi/doc.py: Assert type of object variant qapi/doc.py: enable pylint checks
scripts/qapi/doc.py | 189 ++++++++++++++++++++++++++++-------------- scripts/qapi/gen.py | 3 + scripts/qapi/mypy.ini | 5 -- scripts/qapi/pylintrc | 3 +- 4 files changed, 133 insertions(+), 67 deletions(-)
Signature · 1 line
2.26.2