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

Use proper type annotation #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

thewchan
Copy link

No description provided.

@mhadidg
Copy link
Owner

mhadidg commented Jul 18, 2021

Hi Matt,

Would you elaborate on the benefit(s)?

@mhadidg
Copy link
Owner

mhadidg commented Jul 18, 2021

Also, the commits in your other pull requests (see #2, #3) might be combined in this pull.

@thewchan
Copy link
Author

Not sure which version of Python you're using; but using notation tuple[str] or list[str] will crash; you'll need to import the actual type attribute from the standard library typing for the typing annotation to not raise any exceptions.

See: https://docs.python.org/3/library/typing.html

@jiaqidegege
Copy link

Use tuple[str] instead of importing the corresponding capitalized types(Tuple) is a python3.9 higher feature see https://docs.python.org/3.9/whatsnew/3.9.html#type-hinting-generics-in-standard-collections, the author could explict import typing to support lower version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants