[PATCH v5 3/3] qapi: re-establish linting baseline

John Snow posted 3 patches 2 years, 4 months ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>
[PATCH v5 3/3] qapi: re-establish linting baseline
Posted by John Snow 2 years, 4 months ago
Some very minor housekeeping to make the linters happy once more.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 scripts/qapi/gen.py    | 2 +-
 scripts/qapi/parser.py | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index bf5716b5f3..5412716617 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -13,8 +13,8 @@
 
 from contextlib import contextmanager
 import os
-import sys
 import re
+import sys
 from typing import (
     Dict,
     Iterator,
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 22e7bcc4b1..bf31018aef 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -22,6 +22,7 @@
     Dict,
     List,
     Mapping,
+    Match,
     Optional,
     Set,
     Union,
@@ -563,11 +564,11 @@ def end_comment(self) -> None:
         self._switch_section(QAPIDoc.NullSection(self._parser))
 
     @staticmethod
-    def _match_at_name_colon(string: str):
+    def _match_at_name_colon(string: str) -> Optional[Match[str]]:
         return re.match(r'@([^:]*): *', string)
 
     @staticmethod
-    def _match_section_tag(string: str):
+    def _match_section_tag(string: str) -> Optional[Match[str]]:
         return re.match(r'(Returns|Since|Notes?|Examples?|TODO): *', string)
 
     def _append_body_line(self, line: str) -> None:
-- 
2.41.0
Re: [PATCH v5 3/3] qapi: re-establish linting baseline
Posted by Markus Armbruster 2 years, 3 months ago
John Snow <jsnow@redhat.com> writes:

> Some very minor housekeeping to make the linters happy once more.
>
> Signed-off-by: John Snow <jsnow@redhat.com>

Queued.  Thanks!
Re: [PATCH v5 3/3] qapi: re-establish linting baseline
Posted by John Snow 2 years, 3 months ago
On Wed, Oct 18, 2023, 4:53 AM Markus Armbruster <armbru@redhat.com> wrote:

> John Snow <jsnow@redhat.com> writes:
>
> > Some very minor housekeeping to make the linters happy once more.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
>
> Queued.  Thanks!
>

Hehehe. Thank you O:-)
Re: [PATCH v5 3/3] qapi: re-establish linting baseline
Posted by Philippe Mathieu-Daudé 2 years, 4 months ago
On 5/10/23 01:05, John Snow wrote:
> Some very minor housekeeping to make the linters happy once more.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   scripts/qapi/gen.py    | 2 +-
>   scripts/qapi/parser.py | 5 +++--
>   2 files changed, 4 insertions(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>