qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qapi/parser: Drop two bad type hints for now
@ 2023-05-17  6:16 Markus Armbruster
  2023-05-17 12:46 ` Richard Henderson
  2023-05-17 13:29 ` Igor Mammedov
  0 siblings, 2 replies; 4+ messages in thread
From: Markus Armbruster @ 2023-05-17  6:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: michael.roth, jsnow, richard.henderson, imammedo

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>
---
 scripts/qapi/parser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 4923a59d60..1ff334e6a8 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -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:
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] qapi/parser: Drop two bad type hints for now
  2023-05-17  6:16 [PATCH] qapi/parser: Drop two bad type hints for now Markus Armbruster
@ 2023-05-17 12:46 ` Richard Henderson
  2023-05-17 13:29 ` Igor Mammedov
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-05-17 12:46 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel; +Cc: michael.roth, jsnow, imammedo

On 5/16/23 23:16, Markus Armbruster 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<armbru@redhat.com>
> ---
>   scripts/qapi/parser.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] qapi/parser: Drop two bad type hints for now
  2023-05-17  6:16 [PATCH] qapi/parser: Drop two bad type hints for now Markus Armbruster
  2023-05-17 12:46 ` Richard Henderson
@ 2023-05-17 13:29 ` Igor Mammedov
  1 sibling, 0 replies; 4+ messages in thread
From: Igor Mammedov @ 2023-05-17 13:29 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, michael.roth, jsnow, richard.henderson

On Wed, 17 May 2023 08:16:00 +0200
Markus Armbruster <armbru@redhat.com> 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 <armbru@redhat.com>

Fixes build failure for me on RHEL8

Tested-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  scripts/qapi/parser.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
> index 4923a59d60..1ff334e6a8 100644
> --- a/scripts/qapi/parser.py
> +++ b/scripts/qapi/parser.py
> @@ -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:



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] qapi/parser: Drop two bad type hints for now
  2023-05-17 15:25 [PULL 0/5] QAPI patches patches for 2023-05-17 Markus Armbruster
@ 2023-05-17 15:25 ` Markus Armbruster
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2023-05-17 15:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson

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>
---
 scripts/qapi/parser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 4923a59d60..1ff334e6a8 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -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:
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-17 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-17  6:16 [PATCH] qapi/parser: Drop two bad type hints for now Markus Armbruster
2023-05-17 12:46 ` Richard Henderson
2023-05-17 13:29 ` Igor Mammedov
  -- strict thread matches above, loose matches on Subject: below --
2023-05-17 15:25 [PULL 0/5] QAPI patches patches for 2023-05-17 Markus Armbruster
2023-05-17 15:25 ` [PATCH] qapi/parser: Drop two bad type hints for now Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).