-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Use PyUpgrade to use Python 3.6 features #11447
Conversation
@turbaszek Since backport packages are Python 3.6+ too, so upgrading them is fine too, right? |
Yes, but I'm afraid this change may cause a lot of merge conflict with currently open PRs. I think we should wait with it for 2.0-alpha, probably apply it at the same moment as black |
Yup, this PR can wait :) |
f7ee0b4
to
c59e76b
Compare
19cdafe
to
33c26de
Compare
Rebased, so that we can merge it before beta1 |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
@turbaszek @XD-DENG This is ready for review, as soon as this is merged. I will quickly rebase and make #9550 pass the test too |
.pre-commit-config.yaml
Outdated
@@ -177,6 +177,11 @@ repos: | |||
- id: fix-encoding-pragma | |||
args: | |||
- --remove | |||
- repo: https://github.com/asottile/pyupgrade | |||
rev: v2.7.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
A minor question: shall we use the latest v2.7.3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, will update
Use features like `f-strings` instead of format across the code-base. More details: https://github.com/asottile/pyupgrade
Use features like `f-strings` instead of format across the code-base. More details: https://github.com/asottile/pyupgrade (cherry-picked from commit 8c42cf1)
Use features like `f-strings` instead of format across the code-base. More details: https://github.com/asottile/pyupgrade (cherry-picked from commit 8c42cf1)
Use features like `f-strings` instead of format across the code-base. More details: https://github.com/asottile/pyupgrade (cherry-picked from commit 8c42cf1)
Use features like
f-strings
instead of format across the code-base.More details: https://github.com/asottile/pyupgrade
Features:
.encode()
to bytes literalssuper()
calls# coding: ...
commentmock
importsPY2
blockssix
compatibility codeopen
aliastyping.NamedTuple
/typing.TypedDict
py36+ syntax^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.