You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
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.
@Frostmaine adding types to more modules would be great.
If you check out the code, install it with pip install . and install mypy, then run mypy in the directory, there should be no errors. If there are, let's improve the documentation of how to run mypy. Then pick a file (start with a small one), and add these two lines at the top:
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.
@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.
@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 :)
Activity
Mayur619 commentedon Apr 13, 2021
Hi @sebastinas, I would like to work on this
sebastinas commentedon Apr 13, 2021
@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.
qwergle commentedon Aug 6, 2021
Hi! Can I help?
sebastinas commentedon Aug 6, 2021
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.
victoroliveirab commentedon Sep 30, 2021
Hey, @sebastinas, are there any more files needing help?
sebastinas commentedon Oct 1, 2021
@victoroliveirab Yes, there are. You can start by running
mypyon thebpythonsource tree and start from there.Frostmaine commentedon Oct 27, 2021
Hi can I help? @sebastinas
thomasballinger commentedon Oct 27, 2021
@Frostmaine adding types to more modules would be great.
If you check out the code, install it with
pip install .and install mypy, then run mypy in the directory, there should be no errors. If there are, let's improve the documentation of how to run mypy. Then pick a file (start with a small one), and add these two lines at the top: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.
Ben-Reg commentedon Jan 2, 2022
Hi - I'm new and this looks like a good place to start. Can I start by working on formatter.py?
thomasballinger commentedon Jan 2, 2022
@Ben-Reg that sounds good, thanks for taking a shot at this!
Ben-Reg commentedon Jan 3, 2022
@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.
thomasballinger commentedon Jan 3, 2022
@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.
Ben-Reg commentedon Jan 4, 2022
Thanks @thomasballinger, I opened pull request #947 to add the context. The issue is with the line
token = token.parentspotted-cat commentedon Jan 10, 2022
Heya I would like to help!? @sebastinas
thomasballinger commentedon Jan 10, 2022
@spotted-cat Great! The process is described above, do you have any questions about it? Go right ahead, looking forward to a pull request.
RCReddyN commentedon Jan 13, 2022
Hi! I would like to help.
thomasballinger commentedon Jan 13, 2022
@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 :)