Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
garlontas committed Jun 19, 2023
1 parent efb2dbc commit 79a486e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pystreamapi/_streams/__base_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def group_by(self, key_mapper: Callable[[K], Any]) -> 'BaseStream[K]':
return self

def __group_by(self, key_mapper: Callable[[Any], Any]):
"""Groups the stream by the given key mapper. Uses the implementation of _group_to_dict."""
groups = self._group_to_dict(key_mapper)
self._source = groups.items()

Expand Down Expand Up @@ -154,6 +155,7 @@ def map_to_int(self) -> 'BaseStream[_V]':
return self

def __map_to_int(self):
"""Converts the stream to integers."""
self._map(int)

def map_to_str(self) -> 'BaseStream[_V]':
Expand All @@ -165,6 +167,7 @@ def map_to_str(self) -> 'BaseStream[_V]':
return self

def __map_to_str(self):
"""Converts the stream to strings."""
self._map(str)

def peek(self, action: Callable) -> 'BaseStream[_V]':
Expand Down

0 comments on commit 79a486e

Please sign in to comment.