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




commit e7c8381892e6fad6455b3e6f493fd89ee1d8a5f8
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]