Skip to content

Change unicode to Text in Python 2 stubs #2609

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

Closed
srittau opened this issue Nov 19, 2018 · 2 comments
Closed

Change unicode to Text in Python 2 stubs #2609

srittau opened this issue Nov 19, 2018 · 2 comments
Labels
stubs: false positive Type checkers report false errors

Comments

@srittau
Copy link
Collaborator

srittau commented Nov 19, 2018

Per discussion in python/typing#208 and srittau/peps#19, we should change most occurences of unicode in Python 2 and 2and3 stubs to Text. Type checkers are free to treat unicode as Union[str, unicode] or as just unicode and particularly pytype does the latter. A quick grep showed 425 lines containing the word unicode in those stubs, although there are many false positives.

@srittau srittau added stubs: false positive Type checkers report false errors size-large labels Nov 19, 2018
@remdragon
Copy link

I'm working on this in a fork

@hauntsaninja
Copy link
Collaborator

Closing since the typing repo issue has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false positive Type checkers report false errors
Projects
None yet
Development

No branches or pull requests

3 participants