You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally we should do the same than #23 for class_decorator and for decorator.
Note that _Decorator might need to change to support decorating Types too. Or, even more ideally, we would have a _FuncDecorator for function_decorator, a _ClassDecorator for class_decorator and a _Decorator = Union[_FuncDecorator, _ClassDecorator] for decorator.
# @class_decorator() is called without options or parenthesis
@overload
def class_decorator(
enable_stack_introspection: Callable[P, Any],
custom_disambiguator: Callable[[Any], FirstArgDisambiguation] = ...,
flat_mode_decorated_name: Optional[str] = ...,
) -> _Decorator[P]: ...
# @class_decorator() is called with options or parenthesis.
@overload
def class_decorator(
enable_stack_introspection: bool = ...,
custom_disambiguator: Callable[[Any], FirstArgDisambiguation] = ...,
flat_mode_decorated_name: Optional[str] = ...,
) -> Callable[[Callable[P, Any]], _Decorator[P]]: ...
Ideally we should do the same than #23 for
class_decorator
and fordecorator
.Note that
_Decorator
might need to change to support decoratingType
s too. Or, even more ideally, we would have a_FuncDecorator
forfunction_decorator
, a_ClassDecorator
forclass_decorator
and a_Decorator = Union[_FuncDecorator, _ClassDecorator]
fordecorator
.Originally posted by @smarie in #23 (comment)
The text was updated successfully, but these errors were encountered: