Skip to content

Run pyupgrade on the source code#13355

Merged
hauntsaninja merged 4 commits into
python:masterfrom
sobolevn:run-pyupgrade
Aug 8, 2022
Merged

Run pyupgrade on the source code#13355
hauntsaninja merged 4 commits into
python:masterfrom
sobolevn:run-pyupgrade

Conversation

@sobolevn

@sobolevn sobolevn commented Aug 8, 2022

Copy link
Copy Markdown
Member

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

github-actions Bot commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

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

@sobolevn

sobolevn commented Aug 8, 2022

Copy link
Copy Markdown
Member Author

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