Re: [PATCH 09/11] qapi/gen: Support for switching to another module temporarily

2021-01-14 Thread John Snow
On 12/18/20 3:54 PM, Markus Armbruster wrote: +@contextmanager +def _temp_module(self, name: str) -> ContextManager[None]: Doesn't quite typecheck; we want Iterator[None] -- I think we're typing the function that is yet-to-be-decorated -- mypy will handle typing the resulting function

[PATCH 09/11] qapi/gen: Support for switching to another module temporarily

2020-12-18 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi/gen.py | 8 1 file changed, 8 insertions(+) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index d9f8bac9aa..cb00229f5d 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -15,6 +15,7 @@ from contextlib import contextma