Skip to content

Commit f84f3ba

Browse files
authored
Correct function declaration for type hinting
1 parent 61a4c73 commit f84f3ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beets/ui/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from difflib import SequenceMatcher
3333
from functools import cache
3434
from itertools import chain
35-
from typing import Any, Callable, Literal
35+
from typing import Any, Literal
3636

3737
import confuse
3838

@@ -1258,7 +1258,7 @@ class Subcommand:
12581258
invoked by a SubcommandOptionParser.
12591259
"""
12601260

1261-
func: Callable[[library.Library, optparse.Values, list[str]], Any]
1261+
def func(self, lib: library.Library, opts: optparse.Values, args: list[str]): ...
12621262

12631263
def __init__(self, name, parser=None, help="", aliases=(), hide=False):
12641264
"""Creates a new subcommand. name is the primary way to invoke

0 commit comments

Comments
 (0)