My question is simple. I have this protocol:
from typing import Protocol
class LauncherTemplateConfig(Protocol):
def launch_program_cmd(self, **kwargs) -> list[str]:
pass
And this implementation of the protocol, which I would expect mypy passes, but it does not:
from typing import Optional
from pathlib import Path
class MyLauncherTemplateConfig:
def launch_program_cmd(
self, some_arg: Optional[Path] = None, another_arg=1
) -> list[str]:
I would expect the parameters in MyLauncherTemplateConfig.launch_program_cmd to be compatible with **kwargsin the Protocol class.
Not sure if I am doing something wrong...