Skip to content

Commit 70a6a0a

Browse files
committed
Merge branch 'release/3.8.1'
2 parents b3e4bab + e3e7d40 commit 70a6a0a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

_python_utils_tests/test_containers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_unique_list_raise() -> None:
3232

3333

3434
def test_sliceable_deque() -> None:
35-
d: containers.SlicableDeque[int] = containers.SlicableDeque(range(10))
35+
d: containers.SliceableDeque[int] = containers.SliceableDeque(range(10))
3636
assert d[0] == 0
3737
assert d[-1] == 9
3838
assert d[1:3] == [1, 2]
@@ -49,7 +49,7 @@ def test_sliceable_deque() -> None:
4949

5050

5151
def test_sliceable_deque_pop() -> None:
52-
d: containers.SlicableDeque[int] = containers.SlicableDeque(range(10))
52+
d: containers.SliceableDeque[int] = containers.SliceableDeque(range(10))
5353

5454
assert d.pop() == 9 == 9
5555
assert d.pop(0) == 0
@@ -65,9 +65,9 @@ def test_sliceable_deque_pop() -> None:
6565

6666

6767
def test_sliceable_deque_eq() -> None:
68-
d: containers.SlicableDeque[int] = containers.SlicableDeque([1, 2, 3])
68+
d: containers.SliceableDeque[int] = containers.SliceableDeque([1, 2, 3])
6969
assert d == [1, 2, 3]
7070
assert d == (1, 2, 3)
7171
assert d == {1, 2, 3}
7272
assert d == d
73-
assert d == containers.SlicableDeque([1, 2, 3])
73+
assert d == containers.SliceableDeque([1, 2, 3])

python_utils/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
)
88
__url__: str = 'https://github.com/WoLpH/python-utils'
99
# Omit type info due to automatic versioning script
10-
__version__ = '3.8.0'
10+
__version__ = '3.8.1'

python_utils/containers.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -312,28 +312,28 @@ def __delitem__(
312312

313313
# Type hinting `collections.deque` does not work consistently between Python
314314
# runtime, mypy and pyright currently so we have to ignore the errors
315-
class SlicableDeque(types.Generic[T], collections.deque): # type: ignore
315+
class SliceableDeque(types.Generic[T], collections.deque): # type: ignore
316316
@typing.overload
317317
def __getitem__(self, index: types.SupportsIndex) -> T:
318318
...
319319

320320
@typing.overload
321-
def __getitem__(self, index: slice) -> 'SlicableDeque[T]':
321+
def __getitem__(self, index: slice) -> 'SliceableDeque[T]':
322322
...
323323

324324
def __getitem__(
325325
self, index: types.Union[types.SupportsIndex, slice]
326-
) -> types.Union[T, 'SlicableDeque[T]']:
326+
) -> types.Union[T, 'SliceableDeque[T]']:
327327
'''
328328
Return the item or slice at the given index.
329329
330-
>>> d = SlicableDeque[int]([1, 2, 3, 4, 5])
330+
>>> d = SliceableDeque[int]([1, 2, 3, 4, 5])
331331
>>> d[1:4]
332-
SlicableDeque([2, 3, 4])
332+
SliceableDeque([2, 3, 4])
333333
334-
>>> d = SlicableDeque[str](['a', 'b', 'c'])
334+
>>> d = SliceableDeque[str](['a', 'b', 'c'])
335335
>>> d[-2:]
336-
SlicableDeque(['b', 'c'])
336+
SliceableDeque(['b', 'c'])
337337
338338
'''
339339
if isinstance(index, slice):

0 commit comments

Comments
 (0)