[PATCH b4 v2 00/11] 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.

Signed-off-by: Tamir Duberstein <[email protected]>
---
Changes in v2:
- Rebase.
- Replace b4 ci integration with a simple shell script.
- Link to v1: https://patch.msgid.link/[email protected]

---
Tamir Duberstein (11):
      Add CI script
      Add ruff checks to CI
      Import dependencies unconditionally
      Add ruff format check to CI
      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

 ci.sh                              |   10 +
 misc/retrieve_lore_thread.py       |   17 +-
 misc/review-ci-example.py          |   10 +-
 misc/send-receive.py               |  454 +++++++---
 pyproject.toml                     |   55 +-
 src/b4/__init__.py                 | 1571 +++++++++++++++++++++++-----------
 src/b4/bugs/__init__.py            |   52 +-
 src/b4/bugs/_import.py             |   14 +-
 src/b4/bugs/_tui.py                |  440 ++++++----
 src/b4/command.py                  | 1369 +++++++++++++++++++++++-------
 src/b4/diff.py                     |   50 +-
 src/b4/dig.py                      |   75 +-
 src/b4/ez.py                       | 1016 +++++++++++++++-------
 src/b4/kr.py                       |   10 +-
 src/b4/mbox.py                     |  309 ++++---
 src/b4/pr.py                       |  160 +++-
 src/b4/review/__init__.py          |   52 +-
 src/b4/review/_review.py           |  491 +++++++----
 src/b4/review/checks.py            |  396 +++++----
 src/b4/review/messages.py          |   64 +-
 src/b4/review/tracking.py          |  673 +++++++++------
 src/b4/review_tui/__init__.py      |   38 +-
 src/b4/review_tui/_common.py       |  366 +++++---
 src/b4/review_tui/_entry.py        |   69 +-
 src/b4/review_tui/_lite_app.py     |  111 ++-
 src/b4/review_tui/_modals.py       |  680 +++++++++------
 src/b4/review_tui/_pw_app.py       |  202 +++--
 src/b4/review_tui/_review_app.py   |  513 +++++++----
 src/b4/review_tui/_tracking_app.py | 1543 ++++++++++++++++++++++-----------
 src/b4/tui/__init__.py             |    1 +
 src/b4/tui/_common.py              |   43 +-
 src/b4/tui/_modals.py              |   49 +-
 src/b4/ty.py                       |  233 +++--
 src/tests/conftest.py              |   57 +-
 src/tests/test___init__.py         |  827 ++++++++++++------
 src/tests/test_ez.py               |  154 +++-
 src/tests/test_mbox.py             |   96 ++-
 src/tests/test_messages.py         |   21 +-
 src/tests/test_patatt.py           |   33 +-
 src/tests/test_rethread.py         |  178 ++--
 src/tests/test_review.py           | 1648 +++++++++++++++++++++---------------
 src/tests/test_review_checks.py    |  455 ++++++----
 src/tests/test_review_show_info.py |   97 ++-
 src/tests/test_review_tracking.py  |  990 ++++++++++++++--------
 src/tests/test_three_way_merge.py  |  188 ++--
 src/tests/test_tui_bugs.py         |   42 +-
 src/tests/test_tui_modals.py       |   60 +-
 src/tests/test_tui_review.py       |   98 +--
 src/tests/test_tui_tracking.py     | 1360 ++++++++++++++++++-----------
 49 files changed, 11574 insertions(+), 5866 deletions(-)
---
base-commit: 3bfbc1bf8f9549cfa2ad3949d807ce3d4954bb5d
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.