Migrate from Mypy to ty for type checking#590
Migrate from Mypy to ty for type checking#590abhay-dronavalli wants to merge 32 commits intojeertmans:mainfrom
Conversation
for more information, see https://pre-commit.ci
…lli/manim-slides into migrate-mypy-to-ty changes made
for more information, see https://pre-commit.ci
|
Hi @abhay-dronavalli, your draft looks alreayd great! Apparently, QtPY creates a lot of errors that you need to silence. I know there exists workarounds for MyPy and Pyright, see here. Maybe we can do something about this for ty too? |
…lli/manim-slides into migrate-mypy-to-ty
for more information, see https://pre-commit.ci
Thanks for the reference! I looked into it. I'll check if ty supports similar configuration options. I'll research this after fixing the remaining errors and can update if ty has a better solution. |
…lli/manim-slides into migrate-mypy-to-ty
for more information, see https://pre-commit.ci
…ebook which have different type checking requirements
…lli/manim-slides into migrate-mypy-to-ty
for more information, see https://pre-commit.ci
|
Hi @abhay-dronavalli! I see you marked you PR as ready, but it includes many script files that shouldn't be included. Do you need help removing them? |
Thanks for the heads up! I've removed the helper scripts from the PR. Let me know if there's anything else to fix! |
|
Hi @abhay-dronavalli, I checked locally and ty raises a lot of errors. I have fixed pre-commit workflow and you can see it running online, see here for the latest run logs. Could you take a look and try to fix the issues? |
Fixes #586
Changes
Added ty configuration to
.pre-commit-config.yamlAdded ty rules to
pyproject.tomlwithunused-ignore-comment = "error"Removed Mypy from pre-commit hooks and
pyproject.tomlRemoved 49 unused
# type: ignorecommentsFixed 225 type errors (1 remaining)
1 error in Jupyter notebook (
docs/source/reference/magic_example.ipynb) - notebooks have different type checking requirements and can be addressed separately if neededAll type errors have been resolved. The repository now passes
ty checkwith only 1 ignorable notebook error.