-
Notifications
You must be signed in to change notification settings - Fork 101
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
Apply flake8-pyi autofixes #340
Open
Avasam
wants to merge
1
commit into
microsoft:main
Choose a base branch
from
Avasam:apply-flake8-pyi-autofixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Avasam
commented
Nov 8, 2024
Avasam
force-pushed
the
apply-flake8-pyi-autofixes
branch
3 times, most recently
from
November 10, 2024 19:40
75fc33c
to
4f2c818
Compare
Avasam
force-pushed
the
apply-flake8-pyi-autofixes
branch
2 times, most recently
from
November 22, 2024 19:06
ce565eb
to
60cea37
Compare
Avasam
force-pushed
the
apply-flake8-pyi-autofixes
branch
2 times, most recently
from
November 22, 2024 19:07
9f58676
to
43de54a
Compare
Avasam
commented
Nov 22, 2024
Comment on lines
+45
to
+57
# TODO: Handle in its own PR | ||
"PYI021", # https://github.com/microsoft/python-type-stubs/pull/343 | ||
|
||
# TODO: Investigate and fix or configure | ||
"PYI001", | ||
"PYI002", | ||
"PYI017", | ||
"PYI019", # Request for more autofixes: https://github.com/astral-sh/ruff/issues/14183 | ||
"PYI024", | ||
"PYI048", | ||
"PYI051", # Request for autofix: https://github.com/astral-sh/ruff/issues/14185 | ||
"PYI052", | ||
"PYI061", # Request for more autofixes: https://github.com/astral-sh/ruff/issues/14537 |
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.
Updated references for Ruff 0.8.0:
- Request: Unsafe fix for
custom-type-var-return-type
/PYI019
astral-sh/ruff#14183 - Request: Autofix for
redundant-numeric-union
/PYI041
&redundant-literal-union
/PYI051
astral-sh/ruff#14185 - Request: More autofixes for
redundant-none-literal
/PYI061
astral-sh/ruff#14537
PYI021 is also done separately in #343
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(based on #339, so merge that one first)DoneI added
PYI
to Ruff'sselect
. https://docs.astral.sh/ruff/rules/#flake8-pyi-pyiIgnored
PYI021
to deal with it in its own PRThen run
ruff check --fix --preview
:Found 1700 errors (1074 fixed, 626 remaining).
Then ignore the checks still failing to keep this PR to automated fixes only. (because Ruff has no config to set as warning: astral-sh/ruff#1256)
Note that
flake8-future-annotations (FA)
was already passing on main, so I just included it.