Skip to content

Bump ruff to 0.11.2#13757

Merged
AlexWaygood merged 4 commits intopython:mainfrom
Avasam:Bump-ruff-to-0.11.2
Apr 1, 2025
Merged

Bump ruff to 0.11.2#13757
AlexWaygood merged 4 commits intopython:mainfrom
Avasam:Bump-ruff-to-0.11.2

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Apr 1, 2025

Split off ruff update from #13754 since there's new detections for custom-type-var-for-self (PYI019).
Let's see if the comments in-code still apply.

@Avasam
Copy link
Copy Markdown
Collaborator Author

Avasam commented Apr 1, 2025

pyflakes failure is #13755 (comment) , handled in #13756

@github-actions

This comment has been minimized.

Comment thread stdlib/_typeshed/__init__.pyi Outdated
def __new__(cls: type[Self], sequence: Iterable[_T_co], dict: dict[str, Any] = ...) -> Self: ... # noqa: PYI019
if sys.version_info >= (3, 13):
def __replace__(self: Self, **kwargs: Any) -> Self: ...
def __replace__(self: Self, **kwargs: Any) -> Self: ... # noqa: PYI019
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably do a similar thing to typing.pyi here and use the fully qualified typing_extensions.Self to avoid having to add these noqa comments? (Same for __new__ immediately above)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try it. Maybe Self = TypeVar("Self") at line 40 isn't needed anymore.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Self = TypeVar("Self") at line 40 isn't needed anymore.

I think it is, because we use it in other modules for metaclasses (typing.Self is not allowed in metaclass methods)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a quick search it's still used in 2 openpyxl modules for metaclasses.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2025

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

@AlexWaygood AlexWaygood merged commit 19cea10 into python:main Apr 1, 2025
92 checks passed
@Avasam Avasam deleted the Bump-ruff-to-0.11.2 branch April 1, 2025 17:40
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
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.

2 participants