Skip to content

Commit

Permalink
Merge pull request Textualize#4059 from davep/extendit-tempus
Browse files Browse the repository at this point in the history
Increase the default notification timeout period
  • Loading branch information
davep authored Jan 22, 2024
2 parents ce96219 + 129bab0 commit d9ecd9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Breaking change: `DOMNode.has_pseudo_class` now accepts a single name only https://github.com/Textualize/textual/pull/3970
- Made `textual.cache` (formerly `textual._cache`) public https://github.com/Textualize/textual/pull/3976
- `Tab.label` can now be used to change the label of a tab https://github.com/Textualize/textual/pull/3979
- Changed the default notification timeout from 3 to 5 seconds https://github.com/Textualize/textual/pull/4059

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/textual/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Notification:
severity: SeverityLevel = "information"
"""The severity level for the notification."""

timeout: float = 3
timeout: float = 5
"""The timeout for the notification."""

raised_at: float = field(default_factory=time)
Expand Down
2 changes: 1 addition & 1 deletion tests/notifications/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_default_severity_level() -> None:

def test_default_timeout() -> None:
"""The default timeout should be as expected."""
assert Notification("test").timeout == 3
assert Notification("test").timeout == Notification.timeout


def test_identity_is_unique() -> None:
Expand Down

0 comments on commit d9ecd9f

Please sign in to comment.