-
-
Notifications
You must be signed in to change notification settings - Fork 238
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 #892
Comments
Hi @sebastinas, I would like to work on this |
@Mayur619 Feel free to start with any file that does not already have type annotations. Easiest is probably to start with a module that only imports stuff from the standard library. For others, we probably need stubs or type annotations in our dependencies. |
Hi! Can I help? |
Yes, you can! As said above, pick a file and start with annotating it. Note that for some dependencies, type annotations are still missing. This can be fixed in the dependencies directly or adding stubs in bpython. |
Hey, @sebastinas, are there any more files needing help? |
@victoroliveirab Yes, there are. You can start by running |
Hi can I help? @sebastinas |
@Frostmaine adding types to more modules would be great. If you check out the code, install it with
Now when you run mypy again, you might get some errors. Add types to the file to fix them. Once there are no errors, make a PR and we can see if things should be typed differently. |
Hi - I'm new and this looks like a good place to start. Can I start by working on formatter.py? |
@Ben-Reg that sounds good, thanks for taking a shot at this! |
@thomasballinger, if I have questions, is this the best place to post them? One of the variables in formatter.py is used in a way that makes assigning a type difficult. I'm unsure whether I should rewrite it to allow for stricter typing, or just use the Any type. |
@Ben-Reg opening an in-progress pull request might be the best way to ask since the context will be right there, but you can ask here too. Which variable is it? Even though the file is short I'm having trouble guessing, so I can't suggest something specific. Starting with any sounds good to me, and we can discuss more as code review. |
Thanks @thomasballinger, I opened pull request #947 to add the context. The issue is with the line |
Heya I would like to help!? @sebastinas |
@spotted-cat Great! The process is described above, do you have any questions about it? Go right ahead, looking forward to a pull request. |
Hi! I would like to help. |
@RCReddyN Great — choose a file and take a shot at it, and open a PR. To anyone else, there's no need to post to say you want to help, just go ahead :) |
Some parts of the code are already annotated with types. Let's add to the remaining parts as well.
The text was updated successfully, but these errors were encountered: