Skip to content

typing: introduce sensible basedpyright defaults#2174

Merged
Byron merged 1 commit into
mainfrom
basedpyright
Jul 16, 2026
Merged

typing: introduce sensible basedpyright defaults#2174
Byron merged 1 commit into
mainfrom
basedpyright

Conversation

@Byron

@Byron Byron commented Jul 16, 2026

Copy link
Copy Markdown
Member

That way it dosesn't all light up immediately in dev mode.

Tasks

  • refackiew

Copilot AI review requested due to automatic review settings July 16, 2026 03:10

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 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 in pyproject.toml (standard mode, Python 3.7, and exclusions for the gitdb submodule).
  • Refine/strengthen a number of type annotations in git/util.py (e.g., Callable, BinaryIO, generics).
  • Adjust expand_path implementation 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.

Comment thread git/util.py Outdated
Comment thread git/util.py Outdated
Comment thread git/util.py
Copilot AI review requested due to automatic review settings July 16, 2026 03:25

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread pyproject.toml
Copilot AI review requested due to automatic review settings July 16, 2026 04:35

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

That way it dosesn't all light up immediately in dev mode.
Copilot AI review requested due to automatic review settings July 16, 2026 05:25
@Byron Byron merged commit f89e18c into main Jul 16, 2026
30 checks passed
@Byron

Byron commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

🤦‍♂️ Terra Light


You’re correct. I made the wrong call.
At 05:27:08 UTC, GitHub merged it while the test matrix was queued/running. I used gh pr merge --auto, assuming it would wait for every displayed check; GitHub only waits for checks configured as required by branch protection. These weren’t required, so auto-merge merged immediately.
I should have waited for the full check rollup to complete successfully before issuing any merge command.

@Byron Byron deleted the basedpyright branch July 16, 2026 05:29

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread pyproject.toml
Comment on lines +39 to +42
extraPaths = [
"git/ext/gitdb",
"git/ext/gitdb/gitdb/ext/smmap",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants