diff --git a/beets/library.py b/beets/library.py index 7fead8ca1..68789bf84 100644 --- a/beets/library.py +++ b/beets/library.py @@ -23,7 +23,6 @@ import sys import time import unicodedata from functools import cached_property -from typing import NoReturn from mediafile import MediaFile, UnreadableFileError @@ -50,7 +49,7 @@ log = logging.getLogger("beets") # Library-specific query types. -class SingletonQuery(dbcore.FieldQuery[NoReturn]): +class SingletonQuery(dbcore.FieldQuery[str]): """This query is responsible for the 'singleton' lookup. It is based on the FieldQuery and constructs a SQL clause @@ -61,7 +60,7 @@ class SingletonQuery(dbcore.FieldQuery[NoReturn]): and singleton:false, singleton:0 are handled consistently. """ - def __new__(cls, field, value, *args, **kwargs): + def __new__(cls, field: str, value: str, *args, **kwargs): query = dbcore.query.NoneQuery("album_id") if util.str2bool(value): return query