Skip to content

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

Merged
charris merged 1 commit intonumpy:maintenance/1.23.xfrom
charris:backport-22359
Oct 6, 2022
Merged

TYP,MAINT: Change more overloads to play nice with pyright#22389
charris merged 1 commit intonumpy:maintenance/1.23.xfrom
charris:backport-22359

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Oct 6, 2022

Backport of #22359.

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.

@charris charris added this to the 1.23.4 release milestone Oct 6, 2022
@charris charris merged commit 5303507 into numpy:maintenance/1.23.x Oct 6, 2022
@charris charris deleted the backport-22359 branch October 6, 2022 02:11
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.

2 participants