Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
qapi/parser: Fix type hints
Fixes: 3e32dca (qapi: Rewrite parsing of doc comment section symbols and tags)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230511111709.971477-1-armbru@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
Markus Armbruster authored and rth7680 committed May 15, 2023
1 parent ab4c44d commit e8a77e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/qapi/parser.py
Expand Up @@ -563,11 +563,11 @@ def end_comment(self) -> None:
self._switch_section(QAPIDoc.NullSection(self._parser))

@staticmethod
def _match_at_name_colon(string: str) -> re.Match:
def _match_at_name_colon(string: str) -> Optional[re.Match[str]]:
return re.match(r'@([^:]*): *', string)

@staticmethod
def _match_section_tag(string: str) -> re.Match:
def _match_section_tag(string: str) -> Optional[re.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 e8a77e8

Please sign in to comment.