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

@ByronByron commented Jul 16, 2026

Copy link
Copy Markdown
Member

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

Tasks

  • refackiew

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

CopilotAI 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.

FileDescription
pyproject.tomlIntroduces baseline basedpyright settings to avoid immediate dev-mode noise.
git/util.pyUpdates 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 threadgit/util.py Outdated
Comment threadgit/util.py Outdated
Comment threadgit/util.py
CopilotAI review requested due to automatic review settings July 16, 2026 03:25

CopilotAI 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 threadpyproject.toml
CopilotAI review requested due to automatic review settings July 16, 2026 04:35

CopilotAI 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.
CopilotAI review requested due to automatic review settings July 16, 2026 05:25
@Byron
Byron merged commit f89e18c into mainJul 16, 2026
30 checks passed
@Byron

Copy link
Copy Markdown
MemberAuthor

🤦‍♂️ 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

CopilotAI 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 threadpyproject.toml
Comment on lines +39 to +42
extraPaths = [
"git/ext/gitdb",
"git/ext/gitdb/gitdb/ext/smmap",
]
Sign up for freeto 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

@Byron