CozySynthesizer / cozy

The collection synthesizer
https://cozy.uwplse.org
Apache License 2.0
209 stars 18 forks source link

Use type annotations from standard `typing` module #50

Open Calvin-L opened 6 years ago

Calvin-L commented 6 years ago

Cozy has its own hacky runtime typechecking code. The type annotations it accepts are nonstandard. We should replace uses of it with the standard type annotations from typing so that we can use 3rd-party typecheckers like mypy.

izgzhen commented 5 years ago

Take a look at this: https://github.com/RussBaz/enforce

As far as I know, MyPy is a static type-checking tool, we need to invoke it explicitly in our build. Enforce is a good runtime type-checking library of which the usage is same to our @typechecked decorator.

izgzhen commented 5 years ago

Both are good, and I used them before in production code.

Calvin-L commented 5 years ago

👍