Skip to content

Commit f5bfd59

Browse files
committed
fix #864 : added returned type(s) to all remaining public functions/methods
1 parent ccba06f commit f5bfd59

File tree

9 files changed

+228
-214
lines changed

9 files changed

+228
-214
lines changed

doc/source/changes/version_0_34.rst.inc

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ Miscellaneous improvements
5252
* made all I/O functions/methods/constructors to accept either a string or a pathlib.Path object
5353
for all arguments representing a path (closes :issue:`896`).
5454

55+
* added type hints for all remaining functions and methods which improves autocompletion in editors (such as PyCharm).
56+
Closes :issue:`864`.
5557

5658
Fixes
5759
^^^^^

larray/core/array.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5631,7 +5631,7 @@ def _binop(opname):
56315631
fullname = f'__{opname}__'
56325632
super_method = getattr(np.ndarray, fullname)
56335633

5634-
def opmethod(self, other):
5634+
def opmethod(self, other) -> 'Array':
56355635
res_axes = self.axes
56365636

56375637
if isinstance(other, ExprNode):
@@ -5794,7 +5794,7 @@ def _unaryop(opname):
57945794
fullname = f'__{opname}__'
57955795
super_method = getattr(np.ndarray, fullname)
57965796

5797-
def opmethod(self):
5797+
def opmethod(self) -> 'Array':
57985798
return Array(super_method(self.data), self.axes)
57995799
opmethod.__name__ = fullname
58005800
return opmethod

0 commit comments

Comments
 (0)