Remix.run Logo
Myrmornis 7 months ago

It's a static type-checking system, along the same lines as what Rust, Java, C++ etc have during their compilation processes (and what Typescript has during its transpilation step). The main purpose of static type-checking systems is to find bugs before you ever run the code. It's most useful if your editor shows the type errors as you type, but it can also be done by running pyright or mypy from the command line. And of course running pyright or mypy in CI to guarantee type errors don't get into main. But you are right that in Python they are optional and the value increases with the number of annotations you add!