Skip to content

Commit 61dc391

Browse files
authored
Merge pull request #136 from PermutaTriangle/develop
Version 2.0.1
2 parents 0de5a3e + 7e2f34e commit 61dc391

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## Unreleased
88

9+
## 2.0.1 - 2020-07-23
10+
### Fixed
11+
- Typing for `apply` in `Perm` fixed. It is now of the same base type as argument.
12+
913
## 2.0.0 - 2020-07-20
1014
### Added
1115
- Two new tools added to permtools. A command to check if a class has a regular

permuta/patterns/perm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
Optional,
2222
Set,
2323
Tuple,
24+
TypeVar,
2425
Union,
2526
)
2627

@@ -35,6 +36,7 @@
3536
TupleType = Tuple[int]
3637
else:
3738
TupleType = tuple
39+
ApplyType = TypeVar("ApplyType")
3840

3941

4042
class Perm(TupleType, Patt):
@@ -1999,7 +2001,7 @@ def _pattern_details(self) -> List[Tuple[int, int, int, int]]:
19992001
]
20002002
return self._cached_pattern_details
20012003

2002-
def apply(self, iterable: Iterable[int]) -> Tuple[int, ...]:
2004+
def apply(self, iterable: Iterable[ApplyType]) -> Tuple[ApplyType, ...]:
20032005
"""Permute an iterable using the perm.
20042006
20052007
Examples:

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def read(fname):
1111

1212
setup(
1313
name="permuta",
14-
version="2.0.0",
14+
version="2.0.1",
1515
author="Permuta Triangle",
1616
author_email="permutatriangle@gmail.com",
1717
description="A comprehensive high performance permutation library.",
@@ -29,6 +29,7 @@ def read(fname):
2929
long_description=read("README.rst"),
3030
python_requires=">=3.6",
3131
include_package_data=True,
32+
zip_safe=False,
3233
classifiers=[
3334
"Development Status :: 5 - Production/Stable",
3435
"Intended Audience :: Education",

0 commit comments

Comments
 (0)