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

Disambiguate generic list type hints #109

Merged
merged 2 commits into from
Apr 17, 2023
Merged

Conversation

lukasschwab
Copy link
Owner

Description

Also updates string annotations in constructor arguments.

Imports annotations from __future__, which allows referring to class types before they're defined.

Verification: searched for all instances of : list; there aren't any left in arxiv.py. Generated docs look good.

Breaking changes

List any changes that break the API usage supported on master.

None; just updates type hints.

Relevant issues

List GitHub issues relevant to this change.

None. Prior list typing was just ambiguous, and string-hinted function arguments didn't play nice with IDEs.

Checklist

  • (If appropriate) README.md example usage has been updated. README makes no references to the updated type annotations.

Also updates string annotations in constructor arguments.

Imports `annotations` from `__future__`, which allows referring to
class types before they're defined.

Verification: searched for all instances of `: list`; there aren't any
left in arxiv.py. Generated docs look good.
@lukasschwab lukasschwab merged commit 6f3e908 into master Apr 17, 2023
3 of 4 checks passed
@lukasschwab lukasschwab deleted the hint-nongeneric-lists branch April 17, 2023 00:44
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

1 participant