Sergei Lebedev 0fe377ce42 Added an explicit Any return type to lax_numpy.ndarray methods
This change makes ndarray a bit easier for tooling to handle, since de-facto
all these methods are supposed to return *something*, but the type inferrable
from their default implementations is None.

As a hand-wavy aside, in a type stub

    def f(): ...

could be treated equivalently to

    def f() -> Any: ...

because there is no body to infer return type from, and Any is a reasonable
fallback type. In a .py file, however, f is no longer just a function *type*
(as opposed to function *implementation*), and thus it has an inferrable
return type.
2022-02-08 22:18:16 +00:00
..