Skip to content

chore: migrate from mypy to ty type checker#286

Open
patrit wants to merge 1 commit into
masterfrom
feat_ty
Open

chore: migrate from mypy to ty type checker#286
patrit wants to merge 1 commit into
masterfrom
feat_ty

Conversation

@patrit

@patrit patrit commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

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 migrates the project’s type-checking setup from mypy to the ty type checker, updating dev tooling and configuration accordingly.

Changes:

  • Replace mypy with ty in dev dependencies, pre-commit hooks, and make targets (typecheck, checks).
  • Add typing_extensions as a runtime dependency and adjust code to use it (Self) / add explicit casts for type-checking.
  • Remove mypy configuration (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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants