Skip to content

Resolve some static typing errors

Tamir Duberstein tools 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20241025-better-type-annotations-e732fbdb2ff5

Versions newest first

  1. v1 Latest posting 2/25 patches 3 repliesIn review
  2. v1 posting 1/25 patches 5 repliesApplied

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Add development dependenciespyproject.toml+7 -10 replies
2/5Avoid file descriptor leaksrc/b4/diff.py+3 -30 replies
3/5Correctly type annotate generatorssrc/b4/__init__.py+4 -40 replies
4/5Provide overloads for git_run_commandsrc/b4/__init__.py+26 -110 replies
5/5Add missing importssrc/b4/__init__.py src/b4/diff.py src/b4/ez.py +3 more+12 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [b4 PATCH RESEND 0/5] Resolve some static typing errors

This series slightly improves the quality of type annotations in the project. It also adds development dependencies so they can more easily be installed.

Unfortunately this is only a drop in the bucket; there are still 356 errors as reported by pyright. Without minimal tooling to ensure these don't gress, progress will be difficult.

I'd be happy to contribute such tooling, but I didn't find where to put it - there's no obvious place from which tests are run, for example.

---
Tamir Duberstein (5):
Add development dependencies
Avoid file descriptor leak
Correctly type annotate generators
Provide overloads for git_run_command
Add missing imports

 pyproject.toml             |  8 ++++++-
 src/b4/__init__.py         | 52 ++++++++++++++++++++++++++++++----------------
 src/b4/diff.py             |  7 ++++---
 src/b4/ez.py               |  2 ++
 src/b4/pr.py               |  2 ++
 src/b4/ty.py               |  1 +
 src/tests/test___init__.py |  1 +
 7 files changed, 51 insertions(+), 22 deletions(-)

---
base-commit: 2a6338e451a0c1e81f214f48c820c1e52d76b2f1
change-id: 20241025-better-type-annotations-e732fbdb2ff5

Best regards,
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgtYz36g7iDMSkY5K7Ab51ksGX7h JgsMRt+XVZTrIzMVIAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQDyp0EuH8MRQJAmLtKb9/nsjczbFhwM2g0XcY70EEkGF87t28QCADDPBXv4SIqesgc b8/3E18A09Qv9cHgcldw8=
-----END SSH SIGNATURE-----

Signature · 1 line
Tamir Duberstein <[email protected]>