Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-09 Thread Markus Armbruster
John Snow writes: [...] > I just find it difficult to predict what reviewers will want. Capricious bunch, those reviewers. [...]

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-08 Thread John Snow
On 10/8/20 5:16 AM, Markus Armbruster wrote: John Snow writes: On 10/7/20 7:49 AM, Markus Armbruster wrote: Looks like commit message of PATCH 24 has an answer. Copy to all the commits that omit -> None similarly? Probably not needed. It's covered by the class basics section in the mypy ma

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-08 Thread John Snow
On 10/8/20 3:41 AM, Markus Armbruster wrote: John Snow writes: On 10/7/20 7:32 AM, Markus Armbruster wrote: Ignorant question: what's the difference between -> None (like here) and nothing (like __init__() above? This came up in Cleber's review, too. Mypy supports a gradual typing paradigm

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-08 Thread Markus Armbruster
John Snow writes: > On 10/7/20 7:49 AM, Markus Armbruster wrote: >> Looks like commit message of PATCH 24 has an answer. >> Copy to all the commits that omit -> None similarly? > > Probably not needed. > > It's covered by the class basics section in the mypy manual; > https://mypy.readthedocs.io/

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-08 Thread Markus Armbruster
John Snow writes: > On 10/7/20 7:32 AM, Markus Armbruster wrote: >> Ignorant question: what's the difference between -> None (like here) and >> nothing (like __init__() above? > > This came up in Cleber's review, too. > > Mypy supports a gradual typing paradigm; it is designed to facilitate > wha

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-07 Thread John Snow
On 10/7/20 7:49 AM, Markus Armbruster wrote: Looks like commit message of PATCH 24 has an answer. Copy to all the commits that omit -> None similarly? Probably not needed. It's covered by the class basics section in the mypy manual; https://mypy.readthedocs.io/en/stable/class_basics.html#ann

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-07 Thread John Snow
On 10/7/20 7:32 AM, Markus Armbruster wrote: Ignorant question: what's the difference between -> None (like here) and nothing (like __init__() above? This came up in Cleber's review, too. Mypy supports a gradual typing paradigm; it is designed to facilitate what we are doing here: the gradual

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-07 Thread Markus Armbruster
Markus Armbruster writes: > John Snow writes: > >> Annotations do not change runtime behavior. >> This commit *only* adds annotations. >> >> Signed-off-by: John Snow >> Reviewed-by: Eduardo Habkost >> Reviewed-by: Cleber Rosa >> --- >> scripts/qapi/events.py | 46

Re: [PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-07 Thread Markus Armbruster
John Snow writes: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow > Reviewed-by: Eduardo Habkost > Reviewed-by: Cleber Rosa > --- > scripts/qapi/events.py | 46 -- > scripts/qapi/mypy.ini

[PATCH v5 19/36] qapi/events.py: add type hint annotations

2020-10-05 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/events.py | 46 -- scripts/qapi/mypy.ini | 5 - 2 files changed, 35 ins