]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qapi: re-establish linting baseline
authorJohn Snow <jsnow@redhat.com>
Wed, 4 Oct 2023 23:05:32 +0000 (19:05 -0400)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 19 Oct 2023 05:02:29 +0000 (07:02 +0200)
Some very minor housekeeping to make the linters happy once more.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20231004230532.3002201-4-jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi/gen.py
scripts/qapi/parser.py

index bf5716b5f3012662932314bde644166122da2a97..5412716617aad5ad4e4685e2aedd5431cb3636f0 100644 (file)
@@ -13,8 +13,8 @@
 
 from contextlib import contextmanager
 import os
-import sys
 import re
+import sys
 from typing import (
     Dict,
     Iterator,
index 22e7bcc4b1bcdf35319f2563801e4b584ca63533..bf31018aef0ac43cf7995cda6362635e8c093c5b 100644 (file)
@@ -22,6 +22,7 @@ from typing import (
     Dict,
     List,
     Mapping,
+    Match,
     Optional,
     Set,
     Union,
@@ -563,11 +564,11 @@ class QAPIDoc:
         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: