chore: migrate from mypy to ty type checker#286
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s type-checking setup from mypy to the ty type checker, updating dev tooling and configuration accordingly.
Changes:
- Replace
mypywithtyin dev dependencies, pre-commit hooks, andmaketargets (typecheck,checks). - Add
typing_extensionsas a runtime dependency and adjust code to use it (Self) / add explicit casts for type-checking. - Remove
mypyconfiguration (mypy.ini) and related lockfile entries.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates locked dependencies to drop mypy/stubs and add ty + typing-extensions. |
| README.md | Updates documented commands to use make typecheck instead of make mypy. |
| pyproject.toml | Adds typing_extensions dependency, replaces mypy with ty, and introduces [tool.ty.*] config. |
| mypy.ini | Removes obsolete mypy configuration. |
| Makefile | Replaces mypy target with typecheck (uv run ty check) and updates checks. |
| gitopscli/gitops_config.py | Adds a cast() to satisfy the new type checker. |
| gitopscli/git_api/gitlab_git_repo_api_adapter.py | Renames unused arg for type-checker/linter compliance. |
| gitopscli/git_api/github_git_repo_api_adapter.py | Renames unused args for type-checker/linter compliance. |
| gitopscli/git_api/git_repo.py | Switches Self import to typing_extensions.Self for Python 3.10 support. |
| gitopscli/git_api/git_repo_api_logging_proxy.py | Renames unused arg (but currently drops merge parameters; see comment). |
| gitopscli/git_api/bitbucket_git_repo_api_adapter.py | Renames unused args for type-checker/linter compliance. |
| gitopscli/git_api/azure_devops_git_repo_api_adapter.py | Renames unused arg for type-checker/linter compliance. |
| .pre-commit-config.yaml | Replaces make mypy hook with make typecheck. |
| .gitignore | Removes .mypy_cache ignore entry. |
| .dockerignore | Removes mypy.ini from Docker build context allowlist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+43
to
46
| merge_parameters: dict[str, Any] | None = None, # noqa: ARG002 | ||
| ) -> None: | ||
| logging.info("Merging pull request %s", pr_id) | ||
| self.__api.merge_pull_request(pr_id, merge_method=merge_method) |
christiansiegel
approved these changes
Jun 14, 2026
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.
No description provided.