Skip to content

STY: remove --keep-runtime-typing from pyupgrade Part-2 #40802

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

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

fathomer
Copy link
Contributor

@fathomer fathomer commented Apr 6, 2021

To fix issue #40759 :
Changes here are from PEP585 (e.g. List[str] -> list[str]) and from PEP604 (Optional[str] -> str | None), both of which are only applied in the presence of from future import annotations. Some imports became unused after this so those have been removed.
As there were changes in many files (97) this has been split up into 5 smaller PRs.
This is part 2 of 5.

Refer the discussion here : #40773

@fathomer fathomer changed the title STY: remove --keep-runtime-typing from pyupgrade #40759 Part-2 STY: remove --keep-runtime-typing from pyupgrade Part-2 Apr 6, 2021
@MarcoGorelli MarcoGorelli added the Code Style Code style, linting, code_checks label Apr 6, 2021
@MarcoGorelli MarcoGorelli added this to the 1.3 milestone Apr 6, 2021
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Thanks @fathomer !

I went through this, and then also did:

git merge upstream/master
git checkout upstream/master -- pandas
# removed --keep-runtime-typing
git diff HEAD upstream/master --name-only | xargs pre-commit run  --files 
git diff HEAD

and checked that the only manual changes you made were removing unused imports and Type -> type_t

@MarcoGorelli MarcoGorelli merged commit f6e7188 into pandas-dev:master Apr 6, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STYLE remove --keep-runtime-typing from pyupgrade
2 participants