Replace mypy pre-commit hook with ty - #671
Draft
observingClouds with Copilot wants to merge 1 commit into
Draft
Conversation
Copilot created this pull request from a session on behalf of
observingClouds
June 17, 2026 06:07
View session
Contributor
|
@sadamov |
Contributor
|
Hi @GiGiKoneti this was really just a test of mine to both test if and how much ty would speed up the pre-commit hooks and if it is able to check the same types. As you can see there are still quite some issues and I haven't had a chance to look at the timing yet. Looking at the errors that ty surfaces there might be something to fix in the future as well. IMHO we should stick with mypy for now and have that really set up for the entire codebase. 30 sec for the entire pre-commit hooks is however a rather long time and we might want to explore e.g. ty. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Replaces
mypywith Astraltyin pre-commit while keeping static type-checking in the lint pipeline. Updates project agent guidance and changelog to reflect the tool migration..pre-commit-config.yaml: replacepre-commit/mirrors-mypyhook withastral-sh/ty-pre-commit(id: ty).AGENTS.md: update lint command comment (mypy→ty).CHANGELOG.md: add unreleased Maintenance entry for this migration.tyhook is configured project-wide by design (not filename-driven like typicalmypyhook usage).mypyhookadditional_dependenciesfortypes-*stubs has no direct equivalent in this hook configuration.tyreports a different set of findings.No new runtime/package dependencies were introduced in project metadata.
Issue Link
Handled by system automation.
Type of change
Checklist before requesting a review
pullwith--rebaseoption if possible).Checklist for reviewers
Each PR comes with its own improvements and flaws. The reviewer should check the following:
Author checklist after completed review
reflecting type of change (add section where missing):
Checklist for assignee