Skip to content

TYP: Fix pyright being unable to infer the real and imag output type#20827

Merged
charris merged 1 commit intonumpy:mainfrom
BvB93:real
Jan 15, 2022
Merged

TYP: Fix pyright being unable to infer the real and imag output type#20827
charris merged 1 commit intonumpy:mainfrom
BvB93:real

Conversation

@BvB93
Copy link
Member

@BvB93 BvB93 commented Jan 15, 2022

Closes #20826

Replaces Any as a generic parameter with the _ShapeType typevar.
Workaround for a pyright bug (xref microsoft/pyright#2866).

@BvB93 BvB93 added 03 - Maintenance 09 - Backport-Candidate PRs tagged should be backported labels Jan 15, 2022
@BvB93 BvB93 added this to the 1.22.2 release milestone Jan 15, 2022
@charris charris merged commit 098cba9 into numpy:main Jan 15, 2022
@charris
Copy link
Member

charris commented Jan 15, 2022

Thanks Bas.

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.

_SupportsReal[_ScalarType] does not satisfy the generic bound

2 participants