We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
group_by
I tried this code
pip install git+https://github.com/EntilZha/PyFunctional.git
from functional import seq seq((1, 2), (2, 3)).group_by(lambda e: e[0]).filter(lambda e: len(e[1]) > 0)
mypy says
Argument 1 to "len" has incompatible type "Sequence[LogEntry]"; expected "Sized"
Imo, type hint of .group_by() is wrong and should be like as
.group_by()
def group_by( self, func: Callable[[_T_co], _T] - ) -> Sequence[tuple[_T, Sequence[_T_co]]]: + ) -> Sequence[tuple[_T, list[_T_co]]]:
You can see the code of .group_by() method here.
PyFunctional/functional/pipeline.py
Lines 1075 to 1077 in d1b6479
But I'm not sure. Could anyone check this, please?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried this code
mypy says
Imo, type hint of
.group_by()
is wrong and should be like asYou can see the code of
.group_by()
method here.PyFunctional/functional/pipeline.py
Lines 1075 to 1077 in d1b6479
But I'm not sure. Could anyone check this, please?
The text was updated successfully, but these errors were encountered: