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 typing + mypy #434

Open
gnikonorov opened this issue Dec 21, 2020 · 1 comment
Open

Add typing + mypy #434

gnikonorov opened this issue Dec 21, 2020 · 1 comment
Assignees
Labels
code quality This PR has to do with improving code readability/quality ( refactoring, etc. ) Infrastructure Changes related to project infrastructure ( CI/CD, deploy mechanism, etc. )

Comments

@gnikonorov
Copy link
Member

gnikonorov commented Dec 21, 2020

This project's python code should be typed, and type checking should be part of the CI pipeline. I propose using mypy, we can look at pytest for an example of how to integrate it.

I'm going to try and add in typing. I'll perform changes on a per module level so the reviews are smaller and close this issue when the typing effort is complete. I'll update this issue as I progress

We'd need to do the following subtasks:

@gnikonorov gnikonorov added Infrastructure Changes related to project infrastructure ( CI/CD, deploy mechanism, etc. ) code quality This PR has to do with improving code readability/quality ( refactoring, etc. ) labels Dec 21, 2020
@gnikonorov gnikonorov self-assigned this Dec 21, 2020
@jkowalleck
Copy link
Contributor

don't forget to add a py.typed to indicate that types are used.
see https://www.python.org/dev/peps/pep-0561/#packaging-type-information

in previous projects, I used flake8-annotations to ensure typing was in place everywhere -- maybe this helps.
i configured it, so that typing on self and cls was optional, by ignoring ANN101,ANN102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality This PR has to do with improving code readability/quality ( refactoring, etc. ) Infrastructure Changes related to project infrastructure ( CI/CD, deploy mechanism, etc. )
Projects
None yet
Development

No branches or pull requests

2 participants