Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pinmypy==1.18.2#2087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 12 commits intogitpython-developers:mainfromGeorge-Ogden:mypy
Nov 29, 2025
Merged

Pinmypy==1.18.2#2087

Byron merged 12 commits intogitpython-developers:mainfromGeorge-Ogden:mypy
Nov 29, 2025

Conversation

@George-Ogden
Copy link
Contributor

Pin mypy version and fix errors
Now, the CI will fail when the types are incorrect

@George-OgdenGeorge-Ogden marked this pull request as ready for reviewNovember 28, 2025 12:24
@ByronByron requested a review fromCopilotNovember 29, 2025 09:46
Copilot finished reviewing on behalf ofByronNovember 29, 2025 09:49
Copy link

CopilotAI left a comment

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 pins mypy to version 1.18.2 and addresses type checking errors to enable strict type checking in CI. The changes removecontinue-on-error: true from the mypy CI step and restrict mypy execution to Python 3.9+, ensuring that type errors will now cause CI failures.

  • Pins mypy version and restricts it to Python 3.9+ environments
  • Adds specific type ignore comments with error codes for legitimate type checking edge cases
  • Fixes type annotations and removes unnecessary casts
  • Prevents pytest from treating test utility classes as test classes

Reviewed changes

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

Show a summary per file
FileDescription
test-requirements.txtPins mypy==1.18.2 for Python 3.9+ to prevent new type errors from future mypy releases
pyproject.tomlRemoves python_version constraint allowing mypy to use the running Python version
.github/workflows/pythonpackage.ymlRestricts mypy checks to Python 3.9+ and removes continue-on-error to fail CI on type errors
test/test_submodule.pyAdds__test__ = False to prevent pytest treating TestRootProgress as a test class and adds noqa for assertRaises
test/test_remote.pyAdds return type annotation and__test__ = False to TestRemoteProgress
test/lib/helper.pyRemoves unnecessary B001 noqa code from bare except statements
test/deprecation/test_types.pyRemoves type ignore comment now that Lit_commit_ish is properly defined
git/types.pyGuards Lit_commit_ish type alias with TYPE_CHECKING for proper deprecation handling
git/util.pyAdds type ignores for IterableList, fixes isinstance check logic, and improves error messages
git/repo/fun.pyRemoves unnecessary cast from ref.commit
git/repo/base.pySimplifies config reader comprehension and adds type ignores for progress argument
git/refs/tag.pyMoves type ignore comments to property decorator line for better clarity
git/refs/symbolic.pyReplaces explicit type annotation with cast for instance variable
git/refs/log.pyAdds type ignore for RefLogEntry tuple construction
git/refs/head.pyRemoves duplicate commit type annotation and adds type ignore for delete override
git/objects/submodule/base.pyAdds RemoteReference cast for tracking_branch() result and imports RemoteReference
git/objects/commit.pyAdds str() cast for message in regex to handle bytes type
git/index/typ.pyAdds type ignore comments for IndexEntry tuple construction
git/diff.pyAdds type annotation for change_type class variable with noqa comment
git/config.pyUpdates format string to f-string, removes unnecessary cast and comment, and uses cp._SectionName type
Comments suppressed due to low confidence (1)

git/util.py:1210

  • This method raisesValueError - should raise a LookupError (KeyError or IndexError) instead.
    This method raisesAttributeError - should raise a LookupError (KeyError or IndexError) instead.
    def __getitem__(self, index: Union[SupportsIndex, int, slice, str]) -> T_IterableObj:  # type: ignore[override]

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

Copy link
Member

@ByronByron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks a lot for making this happen!

Apologies for unleashing AI as well, but I think it can be helpful given that I don't really know python anymore, and am quite clueless 😅.

Copy link
Member

@ByronByron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks a lot, let's do it then!

@ByronByron merged commit0fcf291 intogitpython-developers:mainNov 29, 2025
27 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@ByronByronByron approved these changes

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@George-Ogden@Byron

[8]ページ先頭

©2009-2025 Movatter.jp