I have code that looks like the following:
from typing import Callable
def decorate(func: Callable[[str], None]) -> Callable[[str], None]:
return func
@decorate
def do_something(some_str: str = 'Hello world') -> None:
print(some_str)
if __name__ == '__main__':
do_something()
When running mypy, it reports the following error for the last line:
error: Too few arguments for "do_something" [call-arg]
How can I fix this error (without changing the return type of decorate to Callable[..., None])?