qapi: static typing conversion, pt2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest16 patches 53 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
All 16 patches have a Reviewed-by or Acked-by.
| Patch | Eduardo Habkost | Cleber Rosa |
|---|---|---|
| 1/16 | R-b | R-b |
| 2/16 | R-b | R-b |
| 3/16 | R-b | R-b |
| 4/16 | R-b | R-b |
| 5/16 | R-b | R-b |
| 6/16 | R-b | |
| 7/16 | R-b | R-b |
| 8/16 | R-b | R-b |
| 9/16 | R-b | R-b T-b |
| 10/16 | R-b | R-b |
| 11/16 | T-b R-b | R-b T-b |
| 12/16 | R-b | |
| 13/16 | R-b | R-b |
| 14/16 | R-b | R-b |
| 15/16 | R-b | |
| 16/16 | R-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/16] qapi: static typing conversion, pt2
based-on: <[email protected]>
[PATCH v2 00/38] qapi: static typing conversion, pt1
Hi, this series adds static type hints to the QAPI module. This is part two!
Part 2: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt2
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 expr.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 (16):
qapi/expr.py: Remove 'info' argument from nested check_if_str qapi/expr.py: Check for dict instead of OrderedDict qapi/expr.py: constrain incoming expression types qapi/expr.py: Add assertion for union type 'check_dict' qapi/expr.py: move string check upwards in check_type qapi/expr.py: Check type of 'data' member qapi/expr.py: Add casts in a few select cases qapi/expr.py: add type hint annotations qapi/expr.py: rewrite check_if
qapi/expr.py: Remove single-letter variable qapi/expr.py: enable pylint checks
qapi/expr.py: Add docstrings
qapi/expr.py: Modify check_keys to accept any Iterable qapi/expr.py: Use tuples instead of lists for static data qapi/expr.py: move related checks inside check_xxx functions qapi/expr.py: Use an expression checker dispatch table
scripts/qapi/expr.py | 440 +++++++++++++++++++++++++++++++----------- scripts/qapi/mypy.ini | 5 - scripts/qapi/pylintrc | 1 - 3 files changed, 327 insertions(+), 119 deletions(-)
Signature · 1 line
2.26.2