Re: [PATCH 3/6] qapi/parser.py: add type hint annotations (QAPIDoc)

2021-05-21 Thread Markus Armbruster
John Snow writes: > On 5/20/21 11:05 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> Annotations do not change runtime behavior. >>> >>> This commit adds mostly annotations, but uses a TYPE_CHECKING runtime >>> check to conditionally import dependencies, which only triggers during >>>

Re: [PATCH 3/6] qapi/parser.py: add type hint annotations (QAPIDoc)

2021-05-20 Thread John Snow
On 5/20/21 11:05 AM, Markus Armbruster wrote: John Snow writes: Annotations do not change runtime behavior. This commit adds mostly annotations, but uses a TYPE_CHECKING runtime check to conditionally import dependencies, which only triggers during runs of mypy. Signed-off-by: John Snow

Re: [PATCH 3/6] qapi/parser.py: add type hint annotations (QAPIDoc)

2021-05-20 Thread Markus Armbruster
John Snow writes: > Annotations do not change runtime behavior. > > This commit adds mostly annotations, but uses a TYPE_CHECKING runtime > check to conditionally import dependencies, which only triggers during > runs of mypy. > > Signed-off-by: John Snow > > --- > > TopLevelExpr, an idea from

[PATCH 3/6] qapi/parser.py: add type hint annotations (QAPIDoc)

2021-05-19 Thread John Snow
Annotations do not change runtime behavior. This commit adds mostly annotations, but uses a TYPE_CHECKING runtime check to conditionally import dependencies, which only triggers during runs of mypy. Signed-off-by: John Snow --- TopLevelExpr, an idea from previous drafts, makes a return here