[gnome-music/wip/jfelder/songeditor-gtk4: 47/76] utils: Add annotations to get_media_year
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/songeditor-gtk4: 47/76] utils: Add annotations to get_media_year
- Date: Wed, 23 Feb 2022 20:36:44 +0000 (UTC)
commit 2ce209faa4eddf765b798ad319d0c27e69f313c1
Author: Jean Felder <jfelder src gnome org>
Date: Wed Nov 4 18:28:17 2020 +0100
utils: Add annotations to get_media_year
gnomemusic/utils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/utils.py b/gnomemusic/utils.py
index dfa4825f0..87c3eaaec 100644
--- a/gnomemusic/utils.py
+++ b/gnomemusic/utils.py
@@ -28,7 +28,7 @@ import re
import unicodedata
from gettext import gettext as _
-from gi.repository import Gio, GLib, Gtk
+from gi.repository import Gio, GLib, Grl, Gtk
from gnomemusic.musiclogger import MusicLogger
@@ -146,7 +146,7 @@ def get_media_title(item):
return title
-def get_media_year(item, fill_empty=False):
+def get_media_year(item: Grl.Media, fill_empty: bool = False) -> str:
"""Returns the year when the media was published.
:param Grl.Media item: A Grilo Media object
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]