Skip to content
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

random: add new default args in py311 #7400

Merged
merged 2 commits into from
Feb 28, 2022
Merged

Conversation

hauntsaninja
Copy link
Collaborator

Added in bpo-46737

@github-actions
Copy link
Contributor

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


else:
def gauss(mu: float, sigma: float) -> float: ...
def normalvariate(mu: float, sigma: float) -> float: ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if replacing these with pkg_resources.WorkingSet style aliases would be possible, to better match to runtime.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, we should do that. I think for a long time pytype did not support bound methods, but now it does.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup, seems like we should be able to do this now: #4817 (comment)

@Akuli Akuli merged commit b5f32a6 into python:master Feb 28, 2022
@hauntsaninja hauntsaninja deleted the rand branch February 28, 2022 23:40
hauntsaninja pushed a commit to hauntsaninja/typeshed that referenced this pull request Mar 1, 2022
Suggested by Akuli in python#7400

Matches runtime better and minimises duplicated definitions.

pytype only added support for bound methods about a year ago. We use
them in a couple other places, e.g. multiprocessing and pkg_resources
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