Skip to content

Switch to PEP-604 syntax in python2 stubs - #5915

Merged
srittau merged 3 commits into
python:masterfrom
hoefling:pep604-python2
Aug 14, 2021
Merged

srittau merged 3 commits into
python:masterfrom
hoefling:pep604-python2

Conversation

@hoefling

Copy link
Copy Markdown
Contributor

Signed-off-by: oleg.hoefling oleg.hoefling@gmail.com

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
@github-actions

This comment has been minimized.

@JelleZijlstra

Copy link
Copy Markdown
Member

Thanks! I think you'll need to remove a bunch of unused imports. (Pyright catches those, but doesn't run on Python 3.)

@hoefling

Copy link
Copy Markdown
Contributor Author

@JelleZijlstra yep, have to tweak the rewriting script a bit more for the unused imports...

@Akuli

Akuli commented Aug 12, 2021

Copy link
Copy Markdown
Collaborator

You could use my import cleaner from #5872, although it is much uglier than your scripts, and it can do weird things and requires reviewing the diff manually.

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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.

4 participants