Skip to content

Commit a79bb75

Browse files
committed
Fix one overload
1 parent 8d46a85 commit a79bb75

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

stdlib/functools.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ class partialmethod(Generic[_T]):
190190
def __isabstractmethod__(self) -> bool: ...
191191
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
192192

193-
if sys.version_info >= (3, 11):
194-
_RegType: TypeAlias = type[Any] | types.UnionType
195-
else:
196-
_RegType: TypeAlias = type[Any]
197-
198193
@type_check_only
199194
class _SingleDispatchCallable(Generic[_P, _T]):
200195
# First argument pf the callables in the registry is the type to dispatch on.
@@ -225,7 +220,7 @@ class _SingleDispatchCallable(Generic[_P, _T]):
225220
) -> Callable[Concatenate[_S, _P], _T]: ...
226221
# fun.register(int, lambda x: x)
227222
@overload
228-
def register(self, cls: _RegType, func: Callable[Concatenate[_S, _P], _T]) -> Callable[Concatenate[_S, _P], _T]: ...
223+
def register(self, cls: type[_S], func: Callable[Concatenate[_S, _P], _T]) -> Callable[Concatenate[_S, _P], _T]: ...
229224
def _clear_cache(self) -> None: ...
230225
def __call__(self, arg: object, /, *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
231226

0 commit comments

Comments
 (0)