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

Add type annotations #37

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Add type annotations #37

wants to merge 17 commits into from

Conversation

charmoniumQ
Copy link
Contributor

This PR is based on #31, #32, #34, #35, and #36. Review those first. It adds type annotations to the source code. Type annotations allow us to catch errors before we get to runtime and also serve as documentation.

Although this is a big PR, this PR changes almost nothing about the behavior, except adding some assert and import statements; the bulk of the changes (type signatures) do not affect runtime behavior at all.

Now that type annotations have been added, we can catch errors before running the code with MYPYPATH=src mypy --strict src tests, which has been added to the GitHub CI.

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

Successfully merging this pull request may close these issues.

1 participant