Skip to content

Commit

Permalink
Fixes #41
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDecan committed Sep 18, 2020
1 parent 8635698 commit b6e0931
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog

## 2.1.3 (2020-09-18)

### Fixed
- Empty intervals are contained in all intervals ([#41](https://github.com/AlexandreDecan/portion/issues/41)).



## 2.1.2 (2020-09-16)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -21,7 +21,7 @@ The `portion` library (formerly distributed as `python-intervals`) provides data
- Heavily tested with high code coverage.

**Latest release:**
- `portion`: 2.1.2 on 2020-09-16 ([documentation](https://github.com/AlexandreDecan/portion/blob/2.1.2/README.md), [changes](https://github.com/AlexandreDecan/portion/blob/2.1.2/CHANGELOG.md)).
- `portion`: 2.1.3 on 2020-09-18 ([documentation](https://github.com/AlexandreDecan/portion/blob/2.1.3/README.md), [changes](https://github.com/AlexandreDecan/portion/blob/2.1.3/CHANGELOG.md)).
- `python-intervals`: 1.10.0 on 2019-09-26 ([documentation](https://github.com/AlexandreDecan/portion/blob/1.10.0/README.md), [changes](https://github.com/AlexandreDecan/portion/blob/1.10.0/README.md#changelog)).

Note that `python-intervals` will no longer receive updates since it has been replaced by `portion`.
Expand Down
4 changes: 3 additions & 1 deletion portion/interval.py
Expand Up @@ -459,7 +459,9 @@ def __or__(self, other):

def __contains__(self, item):
if isinstance(item, Interval):
if self.atomic:
if item.empty:
return True
elif self.atomic:
left = item.lower > self.lower or (
item.lower == self.lower and
(item.left == self.left or self.left == Bound.CLOSED)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -7,7 +7,7 @@

setup(
name='portion',
version='2.1.2',
version='2.1.3',
license='LGPLv3',

author='Alexandre Decan',
Expand Down

0 comments on commit b6e0931

Please sign in to comment.