Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Add type annotations #892

Open
Open

Description

@sebastinas

Some parts of the code are already annotated with types. Let's add to the remaining parts as well.

Activity

  1. Mayur619 commented on Apr 13, 2021

    @Mayur619

    Hi @sebastinas, I would like to work on this

  2. sebastinas commented on Apr 13, 2021

    @sebastinas
    ContributorAuthor

    @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.

  3. qwergle commented on Aug 6, 2021

    @qwergle
    Contributor

    Hi! Can I help?

  4. sebastinas commented on Aug 6, 2021

    @sebastinas
    ContributorAuthor

    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.

  5. victoroliveirab commented on Sep 30, 2021

    @victoroliveirab

    Hey, @sebastinas, are there any more files needing help?

  6. sebastinas commented on Oct 1, 2021

    @sebastinas
    ContributorAuthor

    @victoroliveirab Yes, there are. You can start by running mypy on the bpython source tree and start from there.

  7. Frostmaine commented on Oct 27, 2021

    @Frostmaine
    Contributor

    Hi can I help? @sebastinas

  8. thomasballinger commented on Oct 27, 2021

    @thomasballinger
    Member

    @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:

    # mypy: disallow_untyped_defs=True
    # mypy: disallow_untyped_calls=True
    

    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.

  9. Ben-Reg commented on Jan 2, 2022

    @Ben-Reg
    Contributor

    Hi - I'm new and this looks like a good place to start. Can I start by working on formatter.py?

  10. thomasballinger commented on Jan 2, 2022

    @thomasballinger
    Member

    @Ben-Reg that sounds good, thanks for taking a shot at this!

  11. Ben-Reg commented on Jan 3, 2022

    @Ben-Reg
    Contributor

    @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.

  12. thomasballinger commented on Jan 3, 2022

    @thomasballinger
    Member

    @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.

  13. Ben-Reg commented on Jan 4, 2022

    @Ben-Reg
    Contributor

    Thanks @thomasballinger, I opened pull request #947 to add the context. The issue is with the line token = token.parent

  14. spotted-cat commented on Jan 10, 2022

    @spotted-cat

    Heya I would like to help!? @sebastinas

  15. thomasballinger commented on Jan 10, 2022

    @thomasballinger
    Member

    @spotted-cat Great! The process is described above, do you have any questions about it? Go right ahead, looking forward to a pull request.

  16. RCReddyN commented on Jan 13, 2022

    @RCReddyN
    Contributor

    Hi! I would like to help.

  17. thomasballinger commented on Jan 13, 2022

    @thomasballinger
    Member

    @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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions