mirror of
https://github.com/beetbox/beets.git
synced 2026-02-23 07:44:38 +01:00
Ensure support for Python 3.8
'typing.Never' was introduced later, and 'typing.Type' was used instead of just 'type' until 3.9. This commit will likely be reverted over time as these 3.8 etc. get dropped.
This commit is contained in:
parent
d3bdf137ea
commit
c13d8c5fa1
2 changed files with 3 additions and 3 deletions
|
|
@ -232,7 +232,7 @@ class BaseFloat(Type[float, N]):
|
|||
"""
|
||||
|
||||
sql = "REAL"
|
||||
query: type[FieldQuery[Any]] = NumericQuery
|
||||
query: typing.Type[FieldQuery[Any]] = NumericQuery
|
||||
model_type = float
|
||||
|
||||
def __init__(self, digits: int = 1):
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ import string
|
|||
import sys
|
||||
import time
|
||||
import unicodedata
|
||||
from typing import Never
|
||||
from functools import cached_property
|
||||
from typing import NoReturn
|
||||
|
||||
from mediafile import MediaFile, UnreadableFileError
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ log = logging.getLogger("beets")
|
|||
# Library-specific query types.
|
||||
|
||||
|
||||
class SingletonQuery(dbcore.FieldQuery[Never]):
|
||||
class SingletonQuery(dbcore.FieldQuery[NoReturn]):
|
||||
"""This query is responsible for the 'singleton' lookup.
|
||||
|
||||
It is based on the FieldQuery and constructs a SQL clause
|
||||
|
|
|
|||
Loading…
Reference in a new issue