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

Add type annotations to smart_open #545

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Draft

Add type annotations to smart_open #545

wants to merge 11 commits into from

Conversation

mpenkov
Copy link
Collaborator

@mpenkov mpenkov commented Oct 3, 2020

This is still a work in progress. I'm playing around with the idea to see if it's worth it.

@mpenkov mpenkov marked this pull request as draft October 3, 2020 14:44
@piskvorky
Copy link
Owner

piskvorky commented Oct 6, 2020

Check out PEP 585: starting with python3.7, annotations become infinitely more readable.

May be worth the wait, until we drop py3.6?

@mpenkov
Copy link
Collaborator Author

mpenkov commented Oct 6, 2020

Will that much change? From looking at that PEP, we'll go from using e.g. Dict[str, int] to dict[str, int] (and get rid of the from typing import (...).

@piskvorky
Copy link
Owner

piskvorky commented Oct 6, 2020

To me – yes. I don't have anything against annotations but rarely use them, because I find they obfuscate more than clarify. Cons>pros.

A nicer, better integrated annotation syntax could tip the scales. Just a nice-to-have feature either way, nothing critical.

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

2 participants