[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qapi/parser: Fix type hints
|
From: |
Markus Armbruster |
|
Subject: |
Re: [PATCH] qapi/parser: Fix type hints |
|
Date: |
Mon, 22 May 2023 09:51:48 +0200 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Paolo Bonzini <pbonzini@redhat.com> writes:
> 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 subscriptable
>>
>> Life'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.
We'll try that after John's venv work is in. Thank you!