[gnome-music/wip/jfelder/songwidget-menu-v3: 9/10] artistalbumwidget: Initial static type annotations support
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/songwidget-menu-v3: 9/10] artistalbumwidget: Initial static type annotations support
- Date: Tue, 3 Aug 2021 12:43:38 +0000 (UTC)
commit 98f64a86268a6d233b93ab1fbfc6f2411b06fa6f
Author: Jean Felder <jfelder src gnome org>
Date: Sun May 9 16:16:14 2021 +0200
artistalbumwidget: Initial static type annotations support
gnomemusic/widgets/artistalbumwidget.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/artistalbumwidget.py b/gnomemusic/widgets/artistalbumwidget.py
index 8488032d0..63dbec2ad 100644
--- a/gnomemusic/widgets/artistalbumwidget.py
+++ b/gnomemusic/widgets/artistalbumwidget.py
@@ -22,11 +22,17 @@
# 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
+from typing import Optional
+import typing
+
from gi.repository import GObject, Gtk
from gnomemusic.utils import ArtSize
from gnomemusic.widgets.disclistboxwidget import DiscBox
from gnomemusic.widgets.songwidget import SongWidget
+if typing.TYPE_CHECKING:
+ from gnomemusic.corealbum import CoreAlbum
@Gtk.Template(resource_path='/org/gnome/Music/ui/ArtistAlbumWidget.ui')
@@ -52,7 +58,10 @@ class ArtistAlbumWidget(Gtk.Box):
),
}
- def __init__(self, corealbum, size_group=None, cover_size_group=None):
+ def __init__(
+ self, corealbum: CoreAlbum,
+ size_group: Optional[Gtk.SizeGroup] = None,
+ cover_size_group: Optional[Gtk.SizeGroup] = None) -> None:
"""Initialize the ArtistAlbumWidget
:param CoreAlbum corealbum: The CoreAlbum object
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]