Adopt basedpyright with a legacy baseline by Byron · Pull Request #2194 · gitpython-developers/GitPython
Repository navigation
Adopt basedpyright with a legacy baseline - #2194
Merged
Byron merged 1 commit into main from fix-basedpyright Jul 26, 2026
Merged
Adopt basedpyright with a legacy baseline #2194 Byron merged 1 commit into main from fix-basedpyright
Conversation
Byron commented Jul 26, 2026
Copy link Copy Markdown
Member
The idea is to one fine day make Zed not light up anymore when looking at the code.
So far, it's not working though, but this PR is a start.
Adopt basedpyright with a legacy baseline
60dec71
Limit analysis to the production and deprecation-test scope already checked by mypy so unrelated tests and fuzz targets do not block adoption. Pin basedpyright for reproducible diagnostics and baseline the existing standard-mode findings. This preserves the current code while making new errors and warnings fail CI. Run the check in one Linux matrix job to avoid duplicating the same fixed-target analysis across every platform and interpreter. Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>Byron force-pushed the fix-basedpyright branch from
82fad97 to
60dec71
Compare
July 26, 2026 06:55 Byron marked this pull request as ready for review July 26, 2026 06:55 Copilot PR reviewer Copilot
AI
review requested due to automatic review settings July 26, 2026 06:55 Copilot started reviewing on behalf of Byron July 26, 2026 06:56
View session
Copilot PR reviewer Copilot
AI
reviewed Jul 26, 2026
View reviewed changes
Copilot
AI
left a comment
Copy link Copy Markdown
Contributor
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Pull request overview
This PR introduces basedpyright as an additional type-checking tool for GitPython, aiming to enable incremental adoption by checking a limited subset of the codebase and adding a legacy diagnostics baseline.
Changes:
- Add
basedpyrightto test dependencies and configure[tool.basedpyright]includes inpyproject.toml. - Add a GitHub Actions step to run basedpyright on Ubuntu / Python 3.12.
- Add
.basedpyright/baseline.jsonto track existing diagnostics for incremental cleanup.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test-requirements.txt |
Adds a pinned basedpyright dependency for supported Python/platforms. |
pyproject.toml |
Configures basedpyright to type-check git/ and test/deprecation/. |
.github/workflows/pythonpackage.yml |
Runs basedpyright in CI (Ubuntu / Python 3.12). |
.basedpyright/baseline.json |
Introduces a legacy baseline of current diagnostics for gradual adoption. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started .
Byron merged commitab33e33
into
main
Jul 26, 2026
49 checks passed
Byron
deleted the
fix-basedpyright
branch
July 26, 2026 07:29
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment