Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyenumerable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__all__ = ["Enumerable", "PurePythonEnumerable", "pp_enumerable"]
__author__ = "AmirHossein Ahmadi"
__license__ = "WTFPL"
__version__ = "1.1.4"
__version__ = "1.1.5"
__maintainer__ = "AmirHossein Ahmadi"
__email__ = "amirthehossein@gmail.com"
__documentation__ = "https://github.com/amirongit/PyEnumerable/blob/master/documentation.md"
7 changes: 3 additions & 4 deletions pyenumerable/implementations/pure_python.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from __future__ import annotations

from collections.abc import Callable, Iterable, Sequence
from contextlib import suppress
from itertools import chain
from itertools import chain, islice
from typing import Any, Protocol

from pyenumerable.protocol import Associable, Enumerable
Expand Down Expand Up @@ -251,9 +250,9 @@ def take(
) -> Enumerable[TSource]:
return PurePythonEnumerable(
*(
self.source[start_or_count:end]
islice(self.source, start_or_count, end)
if (end is not None)
else self.source[:start_or_count]
else islice(self.source, start_or_count)
),
)

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyenumerable"
version = "1.1.4"
version = "1.1.5"
description = "Implementation of .net's IEnumerable interface in python W/ support for generics."
readme = "readme.md"
license = "WTFPL"
Expand Down Expand Up @@ -63,6 +63,7 @@ lint.select = [
]
lint.ignore = ["F401", "COM812"]
lint.fixable = ["ALL"]
extend-exclude = ["__init__.py"]

[tool.pyright]
typeCheckingMode = "strict"
Expand Down
4 changes: 0 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# PyEnumerable ![WTFPL License](http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-4.png)

Implementation of .NET's [IEnumerable](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1?view=net-9.0) interface in python W/ support for generics.

## Issue tracker
- [ ] Improve test code quality
- [ ] Add hashed pure python implementation of `Enumerable` (assuming inputs are guaranteed to be `Hashable` & immutable; not preserving order)
Loading