[PATCH b4 00/12] Enable stricter local checks

Tamir Duberstein <[email protected]>
Newsgroups org.kernel.linux.tools
Message-ID <[email protected]>
This series makes b4 local developer checks enforceable from the
review TUI and makes the repo clean under ruff, mypy, pyright, and ty.

The early patches set ruff formatting and import behavior, make the
test environment reproducible under uv, and type the misc helpers enough
for whole-repo mypy. The middle patches tighten mypy and pyright, then
add ty with all rules enabled and bump the Python requirement to 3.11
because the code already uses 3.11-only syntax.

The last patch wires the review TUI to run the same local checks through
a JSON-emitting series check helper, so reviewers can see ruff, mypy,
pyright, ty, and pytest results from b4 itself.

Signed-off-by: Tamir Duberstein <[email protected]>
---
Tamir Duberstein (12):
      Configure ruff format with single quotes
      Fix ruff check warnings
      Use ruff to sort imports
      Import dependencies unconditionally
      Fix tests under uv with complex git config
      Fix typings in misc/
      Enable mypy unreachable warnings
      Enable and fix pyright diagnostics
      Avoid duplicate map lookups
      Add ty and configuration
      Enable pyright strict mode
      Add local CI review check

 .b4-config                         |   1 +
 misc/b4-ci.py                      |  57 ++++++++
 misc/retrieve_lore_thread.py       |  15 +-
 misc/review-ci-example.py          |   6 +-
 misc/send-receive.py               | 246 ++++++++++++++++++++-----------
 pyproject.toml                     |  42 +++++-
 src/b4/__init__.py                 | 293 +++++++++++++++++++------------------
 src/b4/bugs/__init__.py            |   8 +-
 src/b4/bugs/_import.py             |   3 +-
 src/b4/bugs/_tui.py                |   9 +-
 src/b4/command.py                  |  17 ++-
 src/b4/diff.py                     |  16 +-
 src/b4/dig.py                      |  17 +--
 src/b4/ez.py                       | 110 ++++++--------
 src/b4/kr.py                       |   2 +-
 src/b4/mbox.py                     |  35 ++---
 src/b4/pr.py                       |  30 ++--
 src/b4/review/__init__.py          |  29 ++--
 src/b4/review/_review.py           |  15 +-
 src/b4/review/checks.py            |  17 ++-
 src/b4/review/messages.py          |   1 -
 src/b4/review/tracking.py          |  24 +--
 src/b4/review_tui/__init__.py      |  20 ++-
 src/b4/review_tui/_common.py       | 157 ++++++++++++++++----
 src/b4/review_tui/_entry.py        |   3 +-
 src/b4/review_tui/_lite_app.py     |  19 +--
 src/b4/review_tui/_modals.py       |  61 ++++----
 src/b4/review_tui/_pw_app.py       |  31 ++--
 src/b4/review_tui/_review_app.py   |  90 +++++++-----
 src/b4/review_tui/_tracking_app.py |  83 ++++++-----
 src/b4/tui/_common.py              |  24 +--
 src/b4/tui/_modals.py              |  11 +-
 src/b4/ty.py                       |  46 +++---
 src/tests/conftest.py              |  47 ++++--
 src/tests/test___init__.py         |  15 +-
 src/tests/test_ez.py               |  11 +-
 src/tests/test_mbox.py             |  11 +-
 src/tests/test_patatt.py           |   3 +-
 src/tests/test_rethread.py         |   4 +-
 src/tests/test_review.py           |   4 +-
 src/tests/test_review_checks.py    |   1 -
 src/tests/test_review_show_info.py |   5 +-
 src/tests/test_review_tracking.py  |   9 +-
 src/tests/test_three_way_merge.py  |   7 +-
 src/tests/test_tui_bugs.py         |   1 -
 src/tests/test_tui_modals.py       |  18 ++-
 src/tests/test_tui_review.py       |   6 +-
 src/tests/test_tui_tracking.py     |  28 ++--
 48 files changed, 1036 insertions(+), 672 deletions(-)
---
base-commit: 05a91672afb00b3b3b5f76c7757a518d80509c59
change-id: 20260403-ruff-check-79f9f5441956

Best regards,
--  
Tamir Duberstein <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.