summary refs log tree commit diff stats
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2023-10-04 19:05:32 -0400
committerMarkus Armbruster <armbru@redhat.com>2023-10-19 07:02:29 +0200
commita6c5d159ce8e2f8e4cf5a0cd58de12167dd72311 (patch)
tree837c768eaf6b705e1b7662c30ee98578b39497a7 /scripts/qapi/parser.py
parentdeaca3fd30d3a8829160f8d3705d65ad83176800 (diff)
downloadfocaccia-qemu-a6c5d159ce8e2f8e4cf5a0cd58de12167dd72311.tar.gz
focaccia-qemu-a6c5d159ce8e2f8e4cf5a0cd58de12167dd72311.zip
qapi: re-establish linting baseline
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>
Diffstat (limited to 'scripts/qapi/parser.py')
-rw-r--r--scripts/qapi/parser.py5
1 files changed, 3 insertions, 2 deletions
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 @@ 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: