[gnome-music/wip/jfelder/songwidget-listboxrow: 7/10] playlistswidget: Initial static type annotations support
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/songwidget-listboxrow: 7/10] playlistswidget: Initial static type annotations support
- Date: Sat, 8 May 2021 23:39:59 +0000 (UTC)
commit b8e11a949fd0379f1ee4cf5046797961a3f58efa
Author: Jean Felder <jfelder src gnome org>
Date: Sat May 8 17:38:55 2021 +0200
playlistswidget: Initial static type annotations support
gnomemusic/widgets/playlistswidget.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/playlistswidget.py b/gnomemusic/widgets/playlistswidget.py
index 00f9fbcd2..7f76122b6 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -22,6 +22,9 @@
# 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 Gdk, GObject, Gtk
from gnomemusic.widgets.notificationspopup import PlaylistNotification
@@ -29,6 +32,9 @@ from gnomemusic.widgets.playlistcontextmenu import PlaylistContextMenu
from gnomemusic.widgets.playlistcontrols import PlaylistControls # noqa: F401
from gnomemusic.widgets.playlistdialog import PlaylistDialog
from gnomemusic.widgets.songwidget import SongWidget
+if typing.TYPE_CHECKING:
+ from gnomemusic.application import Application
+ from gnomemusic.view.playlistsview import PlaylistsView
@Gtk.Template(resource_path="/org/gnome/Music/ui/PlaylistsWidget.ui")
@@ -41,7 +47,9 @@ class PlaylistsWidget(Gtk.Box):
_songs_list = Gtk.Template.Child()
_songs_list_ctrlr = Gtk.Template.Child()
- def __init__(self, application, playlists_view):
+ def __init__(
+ self, application: Application,
+ playlists_view: PlaylistsView) -> None:
"""Initialize the PlaylistsWidget.
:param Application application: The application object
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]