-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
collections/typing: fix various arg names #4258
Conversation
This feels nervous, but if it passes unit tests it's unlikely to break anything
@@ -302,15 +302,15 @@ class Sequence(_Collection[_T_co], Reversible[_T_co], Generic[_T_co]): | |||
@abstractmethod | |||
def __getitem__(self, s: slice) -> Sequence[_T_co]: ... | |||
# Mixin methods | |||
def index(self, x: Any, start: int = ..., end: int = ...) -> int: ... | |||
def count(self, x: Any) -> int: ... | |||
def index(self, value: Any, start: int = ..., stop: int = ...) -> int: ... |
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.
A lot of these should probably also be positional-only.
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.
Ideally, yeah. Note that the actual classes in collections.abc don't use positional-only args though, so that would diverge from CPython
Change this so we can land python/typeshed#4258
@JelleZijlstra running into a mypy conflict, would you be willing to merge this and python/mypy#9037? |
Prepare for merge dance on python/typeshed#4258
Yes, starting now with an initial typeshed sync in mypy. |
Prepare for merge dance on python/typeshed#4258
Change this so we can land python/typeshed#4258
This feels nervous, but if it passes unit tests it seems unlikely to
break things