I was working on updating the type checking from mypy to ty following this blog post, and I had a few questions before opening the PR.
| Mypy |
Ty |
| disallow_any_generics |
Doesn't have a corresponding ty rule |
| disallow_untyped_defs |
Doesn't have a corresonding ty rule, but can be handled by adding Ruff rule ANN20 |
| disallow_incomplete_defs |
Doesn't have a corresonding Ty rule, but can be handled by adding Ruff rule ANN001 |
| For the test override ignore_errors |
This doesnt have a corresponding ty rule and the options are to either exclude the tests folder from type checking or manually add every rule that needs to be excluded. |
In addition, when running the type checker using ty. It shows 93 diagnostics errors. It would bring lots of changes to resolve all of this errors in this PR, and the blog post also suggests running the ty type checker with --add-ignore flag, which adds ty: ignore[code] statements to each of the errors, and addressing this errors through follow up PRs.
Questions
- Should I proceed with the changes?
- Do we want to use a combination of
mypy and ty?
- Does this mean the documentation for the enhancement proposal Type checkers and their configuration needs to be updated as well.
I was working on updating the type checking from
mypytotyfollowing this blog post, and I had a few questions before opening the PR.In addition, when running the type checker using ty. It shows 93 diagnostics errors. It would bring lots of changes to resolve all of this errors in this PR, and the blog post also suggests running the ty type checker with
--add-ignoreflag, which addsty: ignore[code]statements to each of the errors, and addressing this errors through follow up PRs.Questions
mypyandty?