John Snow <js...@redhat.com> writes: > Hi, this series adds static types to the QAPI module. > This is part three, and it focuses on expr.py. > > Environment: > - Python >= 3.6, <= 3.8 * > - mypy >= 0.770 > - pylint >= 2.6.0 > - flake8 > - isort > > Every commit should pass with (from ./scripts/): > - flake8 qapi/ > - pylint --rcfile=qapi/pylintrc qapi/ > - mypy --config-file=qapi/mypy.ini qapi/ > - pushd qapi && isort -c . && popd > > V4: > > Patch 2 is exploratory. > Patch 8 is broken and should be merged into Patch 9. > Patches 17-19 are optional and I'd sooner you drop them than have to respin. [...] > - Add test patch to demonstrate 72col docstring enforcement. (Not a fan.) > - Changed MutableMapping type to regular ol' dict. > - Added tests for alternate and union to see what happens when we pass a list > for 'data' instead. (It crashes.) > - Rewrote a bunch of the docstrings. > - Updated type hints for rc0 > - Rebased on latest master, incorporating latest qapi changes. > - Addressed most feedback, some exceptions; > - Kept isinstance check for dict; it is strictly more convenient to me and > it > does not cause breakages. It won't cause breakages. [...]
I skipped PATCH 2+16+18+19. I figure these are independent enough to let me come back to it later. In case of PATCH 16, I better come back quickly, since to go and lose your doc strings would be a shame. On the other patches, I have a few questions and suggestions. So far it looks like no respin will be needed.