Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDecan committed Feb 9, 2023
1 parent 64d1976 commit 42940b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions CHANGELOG.md
Expand Up @@ -3,14 +3,13 @@

## 2.4.0 (not yet released)

### Added
- `from_string` and `from_data` accepts a `klass` parameter to specify which class should be used to create `Interval` instances (default is `Interval`).
- Add a `klass` parameter for `open`, `closed`, `openclosed`, `closedopen`, `singleton` and `empty` (default is `Interval`).
- Add a `_klass` class attribute in `IntervalDict` used to create `Interval` instances (default is `Interval`).

### Changed
- Speed up `repr` and `to_string` for `Interval` instances (see [#76](https://github.com/AlexandreDecan/portion/issues/76), adm271828).
- `IntervalDict` uses `self.__class__` to preserve subclasses when creating new instances.
- Some internal changes to ease subclassing:
* `from_string` and `from_data` accepts a `klass` parameter to specify which class should be used to create `Interval` instances (default is `Interval`).
* (Internal) Add a `klass` parameter for `open`, `closed`, `openclosed`, `closedopen`, `singleton` and `empty` (default is `Interval`).
* (Experimental) Add a `_klass` class attribute in `IntervalDict` to specify how to create `Interval` instances (default is `Interval`).
* `IntervalDict` uses `self.__class__` to preserve subclasses when creating new instances.



Expand Down
4 changes: 2 additions & 2 deletions tests/test_const.py
@@ -1,7 +1,7 @@
import pytest

from portion.const import inf, _PInf, _NInf, Bound
from portion import CLOSED, OPEN
from portion.const import _PInf, _NInf, Bound
from portion import inf, CLOSED, OPEN


class TestBounds:
Expand Down

0 comments on commit 42940b1

Please sign in to comment.