Skip to content

Stdlib: correct many parameter names - #9815

Merged
AlexWaygood merged 11 commits into
python:mainfrom
AlexWaygood:wrong-parameters
Mar 4, 2023
Merged

Stdlib: correct many parameter names#9815
AlexWaygood merged 11 commits into
python:mainfrom
AlexWaygood:wrong-parameters

Conversation

@AlexWaygood

@AlexWaygoodAlexWaygood commented Feb 25, 2023

Copy link
Copy Markdown
Member

I prepared this PR with the help of this script (which you'll notice has a very similar structure to stubdefaulter).


class Event:
def __init__(self, lock: _LockLike | None = ..., *, ctx: BaseContext) -> None: ...
def __init__(self, *, ctx: BaseContext) -> None: ...

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

It doesn't look like this parameter has ever existed at runtime (from what I can see); I'm not sure how it made its way into the stub

@github-actions

This comment has been minimized.

@AlexWaygoodAlexWaygood mentioned this pull request Mar 4, 2023

@hauntsaninjahauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good! Two cases where the old names are better than the new names

Comment threadstdlib/statistics.pyi Outdated
Comment threadstdlib/types.pyi Outdated
Comment threadstdlib/statistics.pyi Outdated
Comment threadstdlib/statistics.pyi Outdated
Comment threadstdlib/types.pyi Outdated
@github-actions

Copy link
Copy Markdown
Contributor

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

@AlexWaygood
AlexWaygood merged commit 257e287 into python:mainMar 4, 2023
@AlexWaygood
AlexWaygood deleted the wrong-parameters branch March 4, 2023 09:53
@AlexWaygood

Copy link
Copy Markdown
MemberAuthor

Thanks for the review!

Sign up for freeto 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

@AlexWaygood@hauntsaninja