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 mypy to typecheck the codebase #1334
Comments
Hello @nicarl, can I help on typechek the codebase? |
Hey that would be great! At the moment I am using the following mypy.ini and mypy 0.790:
I think best is to go file by file. The root folder (containing Should we check in the mypy config and already add the dependency? |
@nicarl sure! I'm kind of new contributing and I just started to using mypy, I saw that you just merged some files, so, could I start right into the root folder? |
Yes you can start in the root folder. You can just ping me if you get stuck. |
@nicarl Hello again Nicarl, I just did a little implementation of type checking in the cli.py file, but I realize that this topic is deeper than I thought, I'm very interested on dive into this and I was wondering that I could need a little guidence on this |
Hello, https://www.python.org/dev/peps/pep-0561/#packaging-type-information Package maintainers who wish to support type checking of their code MUST add a marker file named py.typed to their package supporting typing. If some type hints have been added (even if very partial), would be useful to include the py.typed file to the release to let users to start using type hints and encourage contributions |
Thank you @mdantonio , I've added the |
Great, I will test it as soon as a new version will be released |
Now the fake = Faker() Adding type annotations to the line doesn't help. Removing the I think |
I started to add type annotations some time ago and still have a branch with more type annotations lying around. I will try to rebase it and contribute what I have at the moment. |
My current branch can be found here: https://github.com/nicarl/faker/tree/add_type_annotations_for_providers |
closed by #1536 |
How about adding mypy (http://mypy-lang.org/) to typecheck the codebase?
One could start to add type annotations and once the codebase is covered activate mypy type checking in the CI.
The text was updated successfully, but these errors were encountered: