Skip to content

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