Skip to content

Commit 4ac30ea

Browse files
authored
🔧 Remove mypy configuration (#825)
## Description This PR removes the `mypy` configuration from `pyproject.toml`, as we will be using `ty` for static type checking moving forward. ## Checklist: - [x] The pull request only contains commits that are focused and relevant to this change. - [x] ~I have added appropriate tests that cover the new/changed functionality.~ - [x] ~I have updated the documentation to reflect these changes.~ - [ ] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] ~I have added migration instructions to the upgrade guide (if needed).~ - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes.
1 parent 9bc2018 commit 4ac30ea

File tree

4 files changed

+10
-31
lines changed

4 files changed

+10
-31
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ jobs:
200200
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
201201
with:
202202
enable-ty: true
203+
enable-mypy: false
203204

204205
build-sdist:
205206
name: 🚀 CD

.pre-commit-config.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ci:
1111
autoupdate_commit_msg: "⬆️🪝 update pre-commit hooks"
1212
autoupdate_schedule: quarterly
1313
autofix_commit_msg: "🎨 pre-commit fixes"
14-
skip: [mypy, ty-check]
14+
skip: [ty-check]
1515

1616
repos:
1717
# Standard hooks
@@ -107,20 +107,6 @@ repos:
107107
- id: prettier
108108
types_or: [yaml, markdown, html, css, scss, javascript, json]
109109

110-
# Check static types with mypy
111-
- repo: https://github.com/pre-commit/mirrors-mypy
112-
rev: v1.19.1
113-
hooks:
114-
- id: mypy
115-
files: ^(python/|test/python|noxfile.py)
116-
args: []
117-
additional_dependencies:
118-
- importlib_resources
119-
- nox
120-
- numpy
121-
- pytest
122-
- mqt.core>=3
123-
124110
# Check static types with ty
125111
- repo: local
126112
hooks:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning], with the exception that minor rel
99

1010
## [Unreleased]
1111

12+
### Changed
13+
14+
- 🔧 Replace `mypy` with `ty` ([#775], [#825]) ([**@denialhaag**])
15+
1216
## [3.4.0] - 2026-01-13
1317

1418
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md#340)._
@@ -120,8 +124,10 @@ _📚 Refer to the [GitHub Release Notes] for previous changelogs._
120124

121125
<!-- PR links -->
122126

127+
[#825]: https://github.com/munich-quantum-toolkit/qcec/pull/825
123128
[#817]: https://github.com/munich-quantum-toolkit/qcec/pull/817
124129
[#796]: https://github.com/munich-quantum-toolkit/qcec/pull/796
130+
[#775]: https://github.com/munich-quantum-toolkit/qcec/pull/775
125131
[#735]: https://github.com/munich-quantum-toolkit/qcec/pull/735
126132
[#730]: https://github.com/munich-quantum-toolkit/qcec/pull/730
127133
[#704]: https://github.com/munich-quantum-toolkit/qcec/pull/704

pyproject.toml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,6 @@ run.disable_warnings = [
177177
]
178178

179179

180-
[tool.mypy]
181-
files = ["python/mqt", "test/python", "noxfile.py"]
182-
mypy_path = ["$MYPY_CONFIG_FILE_DIR/python"]
183-
python_version = "3.10"
184-
warn_unused_configs = true
185-
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
186-
strict = true
187-
disallow_untyped_defs = false
188-
explicit_package_bases = true
189-
warn_unreachable = true
190-
191-
[[tool.mypy.overrides]]
192-
module = ["qiskit.*"]
193-
ignore_missing_imports = true
194-
195-
196180
[tool.ty.terminal]
197181
# Error if ty emits any warning-level diagnostics.
198182
error-on-warning = true
@@ -307,6 +291,8 @@ aer = "aer"
307291
[tool.repo-review]
308292
ignore = [
309293
"GH200", # We use Renovate instead of Dependabot
294+
"MY100", # We use ty instead of mypy
295+
"PC140", # We use ty instead of mypy
310296
"PC160", # We use a mirror of crate-ci/typos
311297
]
312298

0 commit comments

Comments
 (0)