Merged
Conversation
Avasam
commented
Nov 8, 2024
75fc33c to
4f2c818
Compare
9f58676 to
43de54a
Compare
Avasam
commented
Nov 22, 2024
pyproject.toml
Outdated
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 |
Contributor
Author
There was a problem hiding this comment.
Updated references for Ruff 0.9.3:
- Request: Unsafe fix for
custom-type-var-return-type/PYI019astral-sh/ruff#14183 - Request: Autofix for
redundant-numeric-union/PYI041&redundant-literal-union/PYI051astral-sh/ruff#14185 - Request: More autofixes for
redundant-none-literal/PYI061astral-sh/ruff#14537 redundant-none-literal (PYI061): Unsafe or different autofix for Python 3.9 astral-sh/ruff#15795- Request: More unsafe fixes for
custom-type-var-return-type/PYI019astral-sh/ruff#15798
PYI021 is also done separately in #343
bab076c to
258163f
Compare
258163f to
f5a01ef
Compare
debonte
approved these changes
Jan 30, 2025
Contributor
debonte
left a comment
There was a problem hiding this comment.
Sorry for the delay. I've been off work for a couple months for medical reasons. I'll try to get these PRs all reviewed over the next 2-3 days.
stubs/matplotlib/transforms.pyi
Outdated
| def __init__(self, shorthand_name: str = ...) -> None: ... | ||
| if DEBUG: | ||
| def __str__(self) -> str: ... | ||
| pass |
Contributor
There was a problem hiding this comment.
Maybe remove the if DEBUG: block entirely?
Contributor
Author
There was a problem hiding this comment.
Funnily enough, that's also done in #352 , but yeah I'll remove the condition entirely.
I've been off work for a couple months for medical reasons
I hope you're doing alright now! Good to have you back.
…into apply-flake8-pyi-autofixes
debonte
approved these changes
Jan 30, 2025
This file contains hidden or 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
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
PYIto Ruff'sselect. https://docs.astral.sh/ruff/rules/#flake8-pyi-pyiIgnored
PYI021to 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.