-
Notifications
You must be signed in to change notification settings - Fork 51
Update type checking to use ty #677
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
mypyandty? - Does this mean the documentation for the enhancement proposal Type checkers and their configuration needs to be updated as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request