Broken type hints for functions decorated with high_level_function
#3401
Labels
bug (unverified)
The problem described would be a bug, but needs to be triaged
Version of Awkward Array
2.7.4
Description and code to reproduce
When using functions like
ak.ones_like
,ak.almost_equal
, the static type checkers (for reference I tested with pylance in vscode and pycharm) are not able to properly resolve the signatures of those functions. Instead, they will always give a(...) -> Any
. It is likely because in the type hint forhigh_level_function
the parameters are omitted and theTypeVar("T")
is not binded to the decorator. A simple solution is to aParamSpec
in the following way:The text was updated successfully, but these errors were encountered: