[gnome-music/wip/jfelder/songwidget-contextmenu: 36/38] playlistcontextmenu: Initial static type annotations support




commit 54ecb27b2748ecc977817a757f6257d7a27eb43d
Author: Jean Felder <jfelder src gnome org>
Date:   Sun May 9 18:54:30 2021 +0200

    playlistcontextmenu: Initial static type annotations support

 gnomemusic/widgets/playlistcontextmenu.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/playlistcontextmenu.py b/gnomemusic/widgets/playlistcontextmenu.py
index 27efbe2e5..5fa1e9492 100644
--- a/gnomemusic/widgets/playlistcontextmenu.py
+++ b/gnomemusic/widgets/playlistcontextmenu.py
@@ -22,8 +22,14 @@
 # code, but you are not obligated to do so.  If you do not wish to do so,
 # delete this exception statement from your version.
 
+from __future__ import annotations
+import typing
+
 from gi.repository import Gio, Gtk
 
+if typing.TYPE_CHECKING:
+    from gnomemusic.application import Application
+
 
 @Gtk.Template(resource_path='/org/gnome/Music/ui/PlaylistContextMenu.ui')
 class PlaylistContextMenu(Gtk.Popover):
@@ -32,7 +38,7 @@ class PlaylistContextMenu(Gtk.Popover):
 
     _song_menu = Gtk.Template.Child()
 
-    def __init__(self, application, view):
+    def __init__(self, application: Application, view: Gtk.ListBox) -> None:
         """Initialize
 
         :param GtkApplication application: The Application object


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]