Skip to content

Commit cb573c2

Browse files
committed
Fix angle brackets in MouseButtonEvent and MouseWheel
Fixes #165
1 parent 1af4f65 commit cb573c2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- Corrected some inconsistent angle brackets in the `__str__` of Event subclasses. #165
12+
913
## [19.3.1] - 2025-08-02
1014

1115
Solved a deprecation warning which was internal to tcod and no doubt annoyed many devs.

tcod/event.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def __repr__(self) -> str:
599599
return f"tcod.event.{self.__class__.__name__}(position={tuple(self.position)!r}, tile={tuple(self.tile)!r}, button={MouseButton(self.button)!r})"
600600

601601
def __str__(self) -> str:
602-
return "<type=%r, position=(x=%i, y=%i), tile=(x=%i, y=%i), button=%r)" % (
602+
return "<type=%r, position=(x=%i, y=%i), tile=(x=%i, y=%i), button=%r>" % (
603603
self.type,
604604
*self.position,
605605
*self.tile,
@@ -650,7 +650,7 @@ def __repr__(self) -> str:
650650
)
651651

652652
def __str__(self) -> str:
653-
return "<%s, x=%i, y=%i, flipped=%r)" % (
653+
return "<%s, x=%i, y=%i, flipped=%r>" % (
654654
super().__str__().strip("<>"),
655655
self.x,
656656
self.y,

0 commit comments

Comments
 (0)