Skip to content

Run pyupgrade on the source code #13355

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 4 commits into from
Aug 8, 2022
Merged

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Aug 8, 2022

I ran pyupgrade on all mypy/* files.
Command: pyupgrade --py37-plus mypy/**/*.py, but I had to do it twice, because pyugrade changes %s to .format first, then to f strings.

Basically, it does several things:

  1. Normalizes typing imports
  2. Uses f strings where possible
  3. Uses different subprocess.run signature

Refs #12711

I will address pyinfo.py in a separate PR.

@github-actions

This comment has been minimized.

4 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

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

@sobolevn
Copy link
Member Author

sobolevn commented Aug 8, 2022

Thanks! I will also request @hauntsaninja's review as someone who has already done that 🙂

@sobolevn sobolevn requested a review from hauntsaninja August 8, 2022 11:02
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.

3 participants