typing.Callable and type hint of decorated method #99
-
Hello from Russia,
my code: if name == 'main': error code: i'm using PyCharm, and find it more comfort to see all possible types of overloaded function when type it, like in multipledispatch, but in multimethod it just shows only one type with *args,**kwargs signature, while there are more than one overload with precise signature. Picture is added here: I'll be grateful to see fixes of this problems |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
p.s. |
Beta Was this translation helpful? Give feedback.
-
Your example works if def t(arg: int) -> int:
return arg Whereas with |
Beta Was this translation helpful? Give feedback.
Your example works if
t
is defined as:Whereas with
t:Callable[[int],int] = lambda arg:arg
, there is no way to know the function signature.