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>
This commit is contained in:
John Snow 2023-10-04 19:05:32 -04:00 committed by Markus Armbruster
parent deaca3fd30
commit a6c5d159ce
2 changed files with 4 additions and 3 deletions

View File

@ -13,8 +13,8 @@
from contextlib import contextmanager
import os
import sys
import re
import sys
from typing import (
Dict,
Iterator,

View 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: