Skip to content

Commit

Permalink
qapi: re-establish linting baseline
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jnsnow authored and Markus Armbruster committed Oct 19, 2023
1 parent deaca3f commit a6c5d15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/qapi/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

from contextlib import contextmanager
import os
import sys
import re
import sys
from typing import (
Dict,
Iterator,
Expand Down
5 changes: 3 additions & 2 deletions scripts/qapi/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Dict,
List,
Mapping,
Match,
Optional,
Set,
Union,
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a6c5d15

Please sign in to comment.