Skip to content

TYP,MAINT: Add a missing explicit Any parameter to the npt.ArrayLike definition#23144

Merged
charris merged 1 commit intonumpy:mainfrom
BvB93:dual
Feb 2, 2023
Merged

TYP,MAINT: Add a missing explicit Any parameter to the npt.ArrayLike definition#23144
charris merged 1 commit intonumpy:mainfrom
BvB93:dual

Conversation

@BvB93
Copy link
Copy Markdown
Member

@BvB93 BvB93 commented Feb 2, 2023

Closes #23137

While equivalent to omitting, explicitly setting generic type parameters that you don't care about to Any is considered best practice.

@BvB93
Copy link
Copy Markdown
Member Author

BvB93 commented Feb 2, 2023

I'd be a bit careful with backporting this btw, as it depends on a Python >= 3.9 feature (i.e. the presence of __class_getitem__).
Still, a version guard in the backport would easily resolve this issue.

@charris
Copy link
Copy Markdown
Member

charris commented Feb 2, 2023

close/reopen

@charris charris closed this Feb 2, 2023
@charris charris reopened this Feb 2, 2023
@charris charris merged commit 1e58f02 into numpy:main Feb 2, 2023
@charris
Copy link
Copy Markdown
Member

charris commented Feb 2, 2023

Thanks Bas.

@charris charris changed the title TYP,MAINT: Add a missing explicit Any parameter to the npt.ArrayLike definition TYP,MAINT: Add a missing explicit Any parameter to the npt.ArrayLike definition Feb 2, 2023
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Feb 2, 2023
@BvB93 BvB93 deleted the dual branch May 12, 2023 13:43
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: np.allclose pyright reportUnknownMemberType

2 participants