Skip to content

Commit d676b10

Browse files
committed
fix return type
1 parent a5ceff9 commit d676b10

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fgpyo/util/inspect.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from typing import List
1212
from typing import Literal
1313
from typing import Optional
14-
from typing import Set
1514
from typing import Tuple
1615
from typing import Type
1716
from typing import Union
@@ -73,7 +72,7 @@ def split_at_given_level(
7372

7473
def list_parser(
7574
cls: Type, type_: TypeAlias, parsers: Optional[Dict[type, Callable[[str], Any]]] = None
76-
) -> Callable[[str], List[Any]]:
75+
) -> partial:
7776
"""
7877
Returns a function that parses a stringified list into a `List` of the correct type.
7978
@@ -102,7 +101,7 @@ def list_parser(
102101

103102
def set_parser(
104103
cls: Type, type_: TypeAlias, parsers: Optional[Dict[type, Callable[[str], Any]]] = None
105-
) -> Callable[[str], Set[Any]]:
104+
) -> partial:
106105
"""
107106
Returns a function that parses a stringified set into a `Set` of the correct type.
108107
@@ -134,7 +133,7 @@ def set_parser(
134133

135134
def tuple_parser(
136135
cls: Type, type_: TypeAlias, parsers: Optional[Dict[type, Callable[[str], Any]]] = None
137-
) -> Callable[[str], Tuple[Any, ...]]:
136+
) -> partial:
138137
"""
139138
Returns a function that parses a stringified tuple into a `Tuple` of the correct type.
140139
@@ -174,7 +173,7 @@ def tuple_parse(tuple_string: str) -> Tuple[Any, ...]:
174173

175174
def dict_parser(
176175
cls: Type, type_: TypeAlias, parsers: Optional[Dict[type, Callable[[str], Any]]] = None
177-
) -> Callable[[str], Dict[Any, Any]]:
176+
) -> partial:
178177
"""
179178
Returns a function that parses a stringified dict into a `Dict` of the correct type.
180179

0 commit comments

Comments
 (0)