typing: introduce sensible basedpyright defaults#2174
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a basedpyright configuration to the repository and makes a set of targeted typing adjustments in git/util.py to reduce type-checker noise while keeping the project’s existing Python 3.7 baseline.
Changes:
- Add
[tool.basedpyright]defaults inpyproject.toml(standard mode, Python 3.7, and exclusions for thegitdbsubmodule). - Refine/strengthen a number of type annotations in
git/util.py(e.g.,Callable,BinaryIO, generics). - Adjust
expand_pathimplementation typing/behavior to be more type-checker-friendly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pyproject.toml | Introduces baseline basedpyright settings to avoid immediate dev-mode noise. |
| git/util.py | Updates several annotations and a few typing-related behaviors to align with static analysis expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
That way it dosesn't all light up immediately in dev mode.
|
🤦♂️ Terra Light You’re correct. I made the wrong call. |
| extraPaths = [ | ||
| "git/ext/gitdb", | ||
| "git/ext/gitdb/gitdb/ext/smmap", | ||
| ] |
That way it dosesn't all light up immediately in dev mode.
Tasks