qapi/parser: Drop two bad type hints for now
PATCH 1/1 qapi/parser: Drop two bad type hints for now
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 <[email protected]>
--- scripts/qapi/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/qapi/parser.py +2 -2
@@ -563,11 +563,11 @@ def end_comment(self) -> None: 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:
Signature · 1 line
2.39.2
Quoted 9 lines · Markus Armbruster
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<[email protected]>--- scripts/qapi/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by Richard Henderson <[email protected]>
r~
Quoted 6 lines · On Wed, 17 May 2023 08:16:00 +0200 Markus Armbruster <[email protected]> wrote:
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 <[email protected]>
Fixes build failure for me on RHEL8
Tested-by Igor Mammedov <[email protected]>
Quoted 22 lines
--- scripts/qapi/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/qapi/parser.py +2
-2@@ -563,11 +563,11 @@ def end_comment(self) -> None: 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: