Bump ruff to 0.11.2#13757
Conversation
|
pyflakes failure is #13755 (comment) , handled in #13756 |
This comment has been minimized.
This comment has been minimized.
| 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 |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
I'll try it. Maybe Self = TypeVar("Self") at line 40 isn't needed anymore.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
From a quick search it's still used in 2 openpyxl modules for metaclasses.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.