Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use type annotations from standard typing module #50

Open
Calvin-L opened this issue Aug 2, 2018 · 3 comments
Open

Use type annotations from standard typing module #50

Calvin-L opened this issue Aug 2, 2018 · 3 comments

Comments

@Calvin-L
Copy link
Collaborator

Calvin-L commented Aug 2, 2018

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.

Calvin-L added a commit that referenced this issue Aug 2, 2018
This is a bit of progress on #50.
@izgzhen
Copy link
Collaborator

izgzhen commented Oct 26, 2018

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
Copy link
Collaborator

izgzhen commented Oct 26, 2018

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

@Calvin-L
Copy link
Collaborator Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants