From f9fb1b15147f48a95e92dd230c38a8601d959b20 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Mon, 24 Jul 2023 10:24:21 +0100 Subject: [PATCH] Remove the implementation of notify from `Screen` (#2996) * 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 --- src/textual/screen.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/textual/screen.py b/src/textual/screen.py index 38705685d5..20848fa661 100644 --- a/src/textual/screen.py +++ b/src/textual/screen.py @@ -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 @@ -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]):