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

Type annotation corrections needed #62

Closed
tekktrik opened this issue Sep 16, 2022 · 3 comments · Fixed by #64
Closed

Type annotation corrections needed #62

tekktrik opened this issue Sep 16, 2022 · 3 comments · Fixed by #64
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers Hacktoberfest DigitalOcean's Hacktoberfest

Comments

@tekktrik
Copy link
Member

This library needs type annotation improvements! It mistakenly uses Type[tuple] where there are namedtuple returns. For example:

from collections import namedtuple

NamedTupleClass = namedtuple("NamedTupleClass", ("A", "B", "C"))

Then if a function use a type annotation like Type[tuple]:

def some_method(arg_a: str, arg_b: int) -> Type[tuple]:
    return NamedTupleClass(1, 2, 3)

It should actually be:

def some_method(arg_a: str, arg_b: int) -> NamedTupleClass:
    return NamedTupleClass(1, 2, 3)
@tekktrik tekktrik added documentation Improvements or additions to documentation good first issue Good for newcomers labels Sep 16, 2022
@Jayaram18
Copy link

Hi @tekktrik ,
I would like to work on this issue.

@tekktrik
Copy link
Member Author

Sure thing! Let me know if I can help with anything!

@adafruit-adabot adafruit-adabot added the Hacktoberfest DigitalOcean's Hacktoberfest label Sep 29, 2022
@tekktrik
Copy link
Member Author

tekktrik commented Oct 6, 2022

Hey @Jayaram18 anything I can help with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers Hacktoberfest DigitalOcean's Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants