Skip to content

Commit

Permalink
Remove the implementation of notify from Screen (#2996)
Browse files Browse the repository at this point in the history
* Remove the implementation of notify on Screen

Screen inherits the one from Widget anyway. I always forget that Screen is a
Widget. O_o

* Remove imports that aren't needed any more
  • Loading branch information
davep authored Jul 24, 2023
1 parent 5153fe6 commit f9fb1b1
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/textual/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from .css.query import NoMatches, QueryType
from .dom import DOMNode
from .geometry import Offset, Region, Size
from .notifications import Notification, SeverityLevel
from .reactive import Reactive
from .renderables.background_screen import BackgroundScreen
from .renderables.blank import Blank
Expand Down Expand Up @@ -940,30 +939,6 @@ def action_dismiss(
"""
self.dismiss(result)

def notify(
self,
message: str,
*,
title: str = "",
severity: SeverityLevel = "information",
timeout: float = Notification.timeout,
) -> Notification:
"""Create a notification.
Args:
message: The message for the notification.
title: The title for the notification.
severity: The severity of the notification.
timeout: The timeout for the notification.
Returns:
The new notification.
See [`App.notify`][textual.app.App.notify] for the full
documentation for this method.
"""
return self.app.notify(message, title=title, severity=severity, timeout=timeout)


@rich.repr.auto
class ModalScreen(Screen[ScreenResultType]):
Expand Down

0 comments on commit f9fb1b1

Please sign in to comment.