From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
Victor Toso de Carvalho <victortoso@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Michael Roth <michael.roth@amd.com>, John Snow <jsnow@redhat.com>
Subject: [PATCH v5 3/3] qapi: re-establish linting baseline
Date: Wed, 4 Oct 2023 19:05:32 -0400 [thread overview]
Message-ID: <20231004230532.3002201-4-jsnow@redhat.com> (raw)
In-Reply-To: <20231004230532.3002201-1-jsnow@redhat.com>
Some very minor housekeeping to make the linters happy once more.
Signed-off-by: John Snow <jsnow@redhat.com>
---
scripts/qapi/gen.py | 2 +-
scripts/qapi/parser.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index bf5716b5f3..5412716617 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -13,8 +13,8 @@
from contextlib import contextmanager
import os
-import sys
import re
+import sys
from typing import (
Dict,
Iterator,
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 @@
Dict,
List,
Mapping,
+ Match,
Optional,
Set,
Union,
@@ -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:
--
2.41.0
next prev parent reply other threads:[~2023-10-04 23:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 23:05 [PATCH v5 0/3] [DO-NOT-MERGE] qapi: static typing conversion, "pt0" John Snow
2023-10-04 23:05 ` [PATCH v5 1/3] [DO-NOT-MERGE] docs: enable sphinx-autodoc for scripts/qapi John Snow
2023-10-04 23:05 ` [PATCH v5 2/3] [DO-NOT-MERGE]: Add some ad-hoc linting helpers John Snow
2023-10-04 23:05 ` John Snow [this message]
2023-10-05 6:44 ` [PATCH v5 3/3] qapi: re-establish linting baseline Philippe Mathieu-Daudé
2023-10-18 8:53 ` Markus Armbruster
2023-10-18 18:41 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231004230532.3002201-4-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=michael.roth@amd.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=victortoso@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).