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

TYP,MAINT: Change more overloads to play nice with pyright #22359

Merged
merged 1 commit into from Oct 2, 2022

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Sep 30, 2022

Closes #22146, follow up on #22193

Mask the first overload of ndarray.__sub__/.__rsub__ with a "dummy-overload" in order to prevent pyright's overload resolver from hitting the NoReturn return type upon encountering overload ambiguity.

@BvB93 BvB93 added this to the 1.23.4 release milestone Sep 30, 2022
@charris charris merged commit 3b6abec into numpy:main Oct 2, 2022
@charris
Copy link
Member

charris commented Oct 2, 2022

Thanks Bas.

@lxop
Copy link

lxop commented Sep 25, 2023

How does this fix #22146 ? That issue is about np.cross(), which is unchanged by this PR, and is still a problem for me in v1.25.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Overloaded return types with np.cross NoReturn leads to type-checking issues
3 participants