qapi/parser: Drop two bad type hints for now
authorMarkus Armbruster <armbru@redhat.com>
Wed, 17 May 2023 06:16:00 +0000 (08:16 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 17 May 2023 17:18:33 +0000 (10:18 -0700)
Two type hints fail centos-stream-8-x86_64 CI.  They are actually
broken.  Changing them to Optional[re.Match[str]] fixes them locally
for me, but then CI fails differently.  Drop them for now.

Fixes: 3e32dca3f0d1 (qapi: Rewrite parsing of doc comment section symbols and tags)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230517061600.1782455-1-armbru@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
scripts/qapi/parser.py

index 4923a59d603a3405c1057a3cc9663388613978bf..1ff334e6a81a0552bf196f8bc79e9beea1a192ca 100644 (file)
@@ -563,11 +563,11 @@ class QAPIDoc:
         self._switch_section(QAPIDoc.NullSection(self._parser))
 
     @staticmethod
-    def _match_at_name_colon(string: str) -> re.Match:
+    def _match_at_name_colon(string: str):
         return re.match(r'@([^:]*): *', string)
 
     @staticmethod
-    def _match_section_tag(string: str) -> re.Match:
+    def _match_section_tag(string: str):
         return re.match(r'(Returns|Since|Notes?|Examples?|TODO): *', string)
 
     def _append_body_line(self, line: str) -> None: