Skip to content

Commit cdb6f81

Browse files
committed
types: change dispatcher call
Signed-off-by: nstarman <[email protected]>
1 parent 5ba8385 commit cdb6f81

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plum/dispatcher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
__all__ = ["Dispatcher", "dispatch", "clear_all_cache"]
1212

13-
T = TypeVar("T", bound=Callable[..., Any])
13+
F = TypeVar("F")
1414

1515

1616
_dataclass_kw_args: dict[str, Any] = {}
@@ -38,16 +38,16 @@ class Dispatcher:
3838
classes: dict[str, dict[str, Function]] = field(default_factory=dict)
3939

4040
@overload
41-
def __call__(self, method: T, /, *, precedence: int = ...) -> T: ...
41+
def __call__(self, method: F, /, *, precedence: int = ...) -> F: ...
4242

4343
@overload
4444
def __call__(
4545
self, method: None, /, *, precedence: int = ...
46-
) -> Callable[[T], T]: ...
46+
) -> Callable[[F], F]: ...
4747

4848
def __call__(
49-
self, method: Optional[T] = None, /, *, precedence: int = 0
50-
) -> Union[T, Callable[[T], T]]:
49+
self, method: Optional[F] = None, /, *, precedence: int = 0
50+
) -> Union[F, Callable[[F], F]]:
5151
"""Decorator to register for a particular signature.
5252
5353
Args:

0 commit comments

Comments
 (0)