-
Hi, thanks to all of you for the amazing work on Ruff and uv. One reason we were able to quickly adopt Ruff and uv is that they are drop-in replacements for previous tools like black and pip. However, the world of type checker tools seems to be a bit more complex. Currently, mypy and pyright are among the most widely used type checkers, but they have different philosophies. For example, our team depends on mypy's setting "--disallow-untyped-defs" to enforce type hints, while some other teams in our company prefer pyright for its superior type inference and speed. I'm curious about which tool Red Knot is more similar to, and maybe we can prepare for the migration in advance. Regardless, I believe Red Knot will be an amazing type checker, and I thank you in advance. Happy holidays! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Type checkers are complex tools, and red knot will certainly not be a drop-in replacement for either mypy or pyright. It will be a distinct alternative with its own design choices. We prioritize good type inference, even in un-annotated code, and we aim to avoid false positives on working unannotated code, where mypy is often more willing to say “you must write this (working) code differently.” We will want to offer something like |
Beta Was this translation helpful? Give feedback.
Type checkers are complex tools, and red knot will certainly not be a drop-in replacement for either mypy or pyright. It will be a distinct alternative with its own design choices. We prioritize good type inference, even in un-annotated code, and we aim to avoid false positives on working unannotated code, where mypy is often more willing to say “you must write this (working) code differently.”
We will want to offer something like
disallow-untyped-defs
, but we would consider that a lint rule to be built on top of the core red knot engine in a type-aware linter, not a core type checker feature.