Skip to content

TYP,BUG: Fix potentially unresolved typevar in median and percentile - #26984

Merged
rgommers merged 1 commit into
numpy:mainfrom
jorenham:typing/median-percentile
Jul 23, 2024
Merged

rgommers merged 1 commit into
numpy:mainfrom
jorenham:typing/median-percentile

Conversation

@jorenham

Copy link
Copy Markdown
Member

This resolves the following Pyright error message in the numpy._function_base_impl stubs for median and percentile.

Type variable "_ArrayType" may go unsolved if caller supplies no argument for parameter "out"
  Provide an overload that specifies the return type when the argument is not supplied

And even though I doubt that this is likely to cause problems in practice, it's better to solve error messages like these, than to e.g. suppress or ignore them.

@jorenham
jorenham force-pushed the typing/median-percentile branch from 30f59bd to c7a1419 Compare July 22, 2024 03:29

@rgommers rgommers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@rgommers rgommers added this to the 2.1.0 release milestone Jul 23, 2024
@rgommers
rgommers merged commit 3d876fd into numpy:main Jul 23, 2024
@jorenham
jorenham deleted the typing/median-percentile branch July 23, 2024 19:08
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