Skip to content

Commit a16e494

Browse files
committed
Fix position setter
1 parent b4b7905 commit a16e494

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

docs/source/changelogs/v3.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Versions 3.0+ Changelog
44

55
These are all the changelogs for stable releases of hikari-miru (version 3.0.0 to present).
66

7+
Version 3.2.2
8+
=============
9+
10+
- Fix ``miru.abc.Item.position`` setter max value being it's width instead of row width.
11+
712
Version 3.2.1
813
=============
914

miru/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"get_view",
5151
)
5252

53-
__version__ = "3.2.1"
53+
__version__ = "3.2.2"
5454

5555
# MIT License
5656
#

miru/abc/item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def position(self) -> t.Optional[int]:
6565

6666
@position.setter
6767
def position(self, value: t.Optional[int]) -> None:
68-
if value is None or (self.width - 1) >= value >= 0:
68+
if value is None or 4 >= value >= 0:
6969
self._position = value
7070
else:
71-
raise ValueError(f"Position of item {type(self).__name__} must be between 0 and {self.width-1}.")
71+
raise ValueError(f"Position of item {type(self).__name__} must be between 0 and 4.")
7272

7373
@property
7474
def row(self) -> t.Optional[int]:

0 commit comments

Comments
 (0)