|
| From: | Paolo Bonzini |
| Subject: | Re: [PATCH] qapi/parser: Fix type hints |
| Date: | Wed, 17 May 2023 19:14:48 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 |
On 5/16/23 07:22, Markus Armbruster wrote:
File "/builds/qemu-project/qemu/scripts/qapi/parser.py", line 566, in QAPIDoc def _match_at_name_colon(string: str) -> Optional[re.Match[str]]: TypeError: 'type' object is not subscriptableLife's too short for wrestling with such pigs. Unless John has better ideas, I'll*remove* these return type annotations. Maybe these pigs will behave after John's Python venv work lands.
re.Match[str] is new in 3.9. However, typing.Match[str] should work. Paolo
| [Prev in Thread] | Current Thread | [Next in Thread] |