Skip to content

collections/typing: fix various arg names - #4258

Merged
JelleZijlstra merged 2 commits into
python:masterfrom
hauntsaninja:col
Jun 28, 2020
Merged

JelleZijlstra merged 2 commits into
python:masterfrom
hauntsaninja:col

Conversation

@hauntsaninja

Copy link
Copy Markdown
Collaborator

This feels nervous, but if it passes unit tests it seems unlikely to
break things

hauntsaninja added 2 commits June 23, 2020 01:14
This feels nervous, but if it passes unit tests it's unlikely to break
anything
Comment thread stdlib/3/typing.pyi
# 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: ...

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.

A lot of these should probably also be positional-only.

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.

Ideally, yeah. Note that the actual classes in collections.abc don't use positional-only args though, so that would diverge from CPython

hauntsaninja pushed a commit to hauntsaninja/mypy that referenced this pull request Jun 23, 2020
@hauntsaninja

Copy link
Copy Markdown
Collaborator Author

@JelleZijlstra running into a mypy conflict, would you be willing to merge this and python/mypy#9037?

JelleZijlstra added a commit to JelleZijlstra/mypy that referenced this pull request Jun 28, 2020
Prepare for merge dance on python/typeshed#4258
@JelleZijlstra

Copy link
Copy Markdown
Member

Yes, starting now with an initial typeshed sync in mypy.

JelleZijlstra added a commit to python/mypy that referenced this pull request Jun 28, 2020
Prepare for merge dance on python/typeshed#4258
@JelleZijlstra
JelleZijlstra merged commit fe58699 into python:master Jun 28, 2020
JelleZijlstra pushed a commit to python/mypy that referenced this pull request Jun 28, 2020
@hauntsaninja
hauntsaninja deleted the col branch June 28, 2020 20:22
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