public inbox for tools@linux.kernel.org
 help / color / mirror / Atom feed
From: Tamir Duberstein <tamird@gmail.com>
To: "Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	 Tamir Duberstein <tamird@gmail.com>
Subject: [PATCH 00/14] Harden local type checking and test mocking
Date: Fri, 10 Apr 2026 18:37:51 -0400	[thread overview]
Message-ID: <20260410-harden-type-checking-v1-0-fcf314d9d748@gmail.com> (raw)

This series raises the local quality floor by making the type-checking
tooling stricter and by removing test patterns that rely on unsafe or
poorly typed mocks.

It starts by wiring the repository into b4 CI checks, then adds ruff,
pyright, and ty so the same checks run consistently in one place. After
that, it removes suppressions incrementally by making the code and tests
more explicit and better typed: typed keyword forwarding in
from_git_config, a typed authheaders integration, and test-local
subclasses instead of method reassignment.

The goal is to keep each change reviewable on its own while moving the
tree toward a stricter baseline with fewer exceptions and less fragile
mocking.

It would be nice to reduce or remove the use of `patch` entirely, but
this series stops short of that since it would require significant
restructuring.

The final commit adds the minimal b4 configuration needed to send this
series. :)

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
Tamir Duberstein (14):
      Add b4 CI checks and mypy suppressions
      Type make_msg and drop test suppressions
      Add ruff import checks to b4 CI
      Add ruff format check to CI
      Add pyright strict checks to CI
      Replace HTTP session mocks with responses
      Add ty checks to CI
      Drop redundant read-only property test
      Type from_git_config keyword arguments
      Add authheaders stub and typed callable
      Replace batch mocks with subclasses
      Use CompletedProcess in git config tests
      Update README for uv-based dev checks
      Add b4 send configuration

 .b4-config                       |    8 +
 README.md                        |   11 +-
 pyproject.toml                   |   25 +-
 src/liblore/__init__.py          |    2 +-
 src/liblore/node.py              |  104 +-
 src/liblore/utils.py             |   89 +-
 tests/conftest.py                |   90 +-
 tests/test_auth_headers.py       |   83 +-
 tests/test_cache.py              |  220 +++--
 tests/test_email_utils.py        |   63 +-
 tests/test_formatting.py         |  324 +++---
 tests/test_mbox.py               |    7 +-
 tests/test_message.py            |   11 +-
 tests/test_node.py               | 1999 +++++++++++++++++++++-----------------
 tests/test_thread.py             |   35 +-
 tools/b4-ci-check.py             |  118 +++
 typings/authheaders/__init__.pyi |   13 +
 17 files changed, 1921 insertions(+), 1281 deletions(-)
---
base-commit: 1c0b653bdb6eeb95625e99419d4b34d31cb55c99
change-id: 20260410-harden-type-checking-e92ed8b4cac1

Best regards,
--  
Tamir Duberstein <tamird@gmail.com>


             reply	other threads:[~2026-04-10 22:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 22:37 Tamir Duberstein [this message]
2026-04-10 22:37 ` [PATCH 01/14] Add b4 CI checks and mypy suppressions Tamir Duberstein
2026-04-10 22:37 ` [PATCH 02/14] Type make_msg and drop test suppressions Tamir Duberstein
2026-04-10 22:37 ` [PATCH 03/14] Add ruff import checks to b4 CI Tamir Duberstein
2026-04-10 22:37 ` [PATCH 04/14] Add ruff format check to CI Tamir Duberstein
2026-04-10 22:37 ` [PATCH 05/14] Add pyright strict checks " Tamir Duberstein
2026-04-10 22:37 ` [PATCH 06/14] Replace HTTP session mocks with responses Tamir Duberstein
2026-04-10 22:37 ` [PATCH 07/14] Add ty checks to CI Tamir Duberstein
2026-04-10 22:37 ` [PATCH 08/14] Drop redundant read-only property test Tamir Duberstein
2026-04-10 22:38 ` [PATCH 09/14] Type from_git_config keyword arguments Tamir Duberstein
2026-04-10 22:38 ` [PATCH 10/14] Add authheaders stub and typed callable Tamir Duberstein
2026-04-10 22:38 ` [PATCH 11/14] Replace batch mocks with subclasses Tamir Duberstein
2026-04-10 22:38 ` [PATCH 12/14] Use CompletedProcess in git config tests Tamir Duberstein
2026-04-10 22:38 ` [PATCH 13/14] Update README for uv-based dev checks Tamir Duberstein
2026-04-10 22:38 ` [PATCH 14/14] Add b4 send configuration Tamir Duberstein

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=20260410-harden-type-checking-v1-0-fcf314d9d748@gmail.com \
    --to=tamird@gmail.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@kernel.org \
    /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