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:
parent
deaca3fd30
commit
a6c5d159ce
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
from typing import (
|
from typing import (
|
||||||
Dict,
|
Dict,
|
||||||
Iterator,
|
Iterator,
|
||||||
|
|
|
@ -22,6 +22,7 @@ from typing import (
|
||||||
Dict,
|
Dict,
|
||||||
List,
|
List,
|
||||||
Mapping,
|
Mapping,
|
||||||
|
Match,
|
||||||
Optional,
|
Optional,
|
||||||
Set,
|
Set,
|
||||||
Union,
|
Union,
|
||||||
|
@ -563,11 +564,11 @@ class QAPIDoc:
|
||||||
self._switch_section(QAPIDoc.NullSection(self._parser))
|
self._switch_section(QAPIDoc.NullSection(self._parser))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _match_at_name_colon(string: str):
|
def _match_at_name_colon(string: str) -> Optional[Match[str]]:
|
||||||
return re.match(r'@([^:]*): *', string)
|
return re.match(r'@([^:]*): *', string)
|
||||||
|
|
||||||
@staticmethod
|
@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)
|
return re.match(r'(Returns|Since|Notes?|Examples?|TODO): *', string)
|
||||||
|
|
||||||
def _append_body_line(self, line: str) -> None:
|
def _append_body_line(self, line: str) -> None:
|
||||||
|
|
Loading…
Reference in New Issue