From: David Gow <firstname.lastname@example.org>
To: Daniel Latypov <email@example.com>
Cc: Brendan Higgins <firstname.lastname@example.org>,
Linux Kernel Mailing List <email@example.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
Shuah Khan <firstname.lastname@example.org>
Subject: Re: [PATCH 1/3] kunit: tool: surface and address more typing issues
Date: Fri, 4 Dec 2020 13:50:29 +0800 [thread overview]
Message-ID: <CABVgOSmPFYYrjU5KHgKftU1P2CcCTM_HvxJr2YRzKfuaZWjxSA@mail.gmail.com> (raw)
On Fri, Dec 4, 2020 at 3:41 AM Daniel Latypov <email@example.com> wrote:
> The authors of this tool were more familiar with a different
> type-checker, https://github.com/google/pytype.
> That's open source, but mypy seems more prevalent (and runs faster).
> And unlike pytype, mypy doesn't try to infer types so it doesn't check
> unanotated functions.
> So annotate ~all functions in kunit tool to increase type-checking
> Note: per https://www.python.org/dev/peps/pep-0484/, `__init__()` should
> be annotated as `-> None`.
> Doing so makes mypy discover a number of new violations.
> Exclude main() since we reuse `request` for the different types of
> requests, which mypy isn't happy about.
> This commit fixes all but one error, where `TestSuite.status` might be
> Signed-off-by: Daniel Latypov <firstname.lastname@example.org>
This looks good to me: I gave it some quick testing, and reading
through it, all of the changes seem sensible.
I wasn't able to get pytype running here, but mypy worked fine.
Reviewed-by: David Gow <email@example.com>
prev parent reply other threads:[~2020-12-04 5:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 19:41 [PATCH 1/3] kunit: tool: surface and address more typing issues Daniel Latypov
2020-12-03 19:41 ` [PATCH 2/3] kunit: tool: fix minor typing issue with None status Daniel Latypov
2020-12-04 4:16 ` David Gow
2020-12-04 18:08 ` Daniel Latypov
2020-12-03 19:41 ` [PATCH 3/3] kunit: tool: move kunitconfig parsing into __init__ Daniel Latypov
2020-12-04 3:57 ` David Gow
2020-12-04 18:18 ` Daniel Latypov
2020-12-05 5:04 ` David Gow
2020-12-04 5:50 ` David Gow [this message]
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).