Improved avg, max and min queries type handling

This commit is contained in:
2021-07-27 12:42:33 +02:00
parent daac14e099
commit a26c6f1bd9
5 changed files with 36 additions and 27 deletions

View File

@@ -64,11 +64,11 @@ class Iterable(IterableABC):
def for_each(self, func: Callable):
for_each_query(self, func)
def max(self, t: type, func: Callable) -> Union[int, float, complex]:
return max_query(self, t, func)
def max(self, func: Callable) -> Union[int, float, complex]:
return max_query(self, func)
def min(self, t: type, func: Callable) -> Union[int, float, complex]:
return min_query(self, t, func)
def min(self, func: Callable) -> Union[int, float, complex]:
return min_query(self, func)
def order_by(self, func: Callable) -> OrderedIterableABC:
res = order_by_query(self, func)