ruff
1796ca97 - [red-knot] Special case `@abstractmethod` for function type (#17591)

Commit
143 days ago
[red-knot] Special case `@abstractmethod` for function type (#17591) ## Summary This is required because otherwise the inferred type is not going to be `Type::FunctionLiteral` but a todo type because we don't recognize `TypeVar` yet: ```py _FuncT = TypeVar("_FuncT", bound=Callable[..., Any]) def abstractmethod(funcobj: _FuncT) -> _FuncT: ... ``` This is mainly required to raise diagnostic when only some (and not all) `@overload`-ed functions are decorated with `@abstractmethod`.
Author
Parents
Loading