more typing work

This commit is contained in:
Kovid Goyal
2020-03-13 21:41:07 +05:30
parent 626a96e20f
commit a348f64833
6 changed files with 123 additions and 63 deletions

View File

@@ -29,7 +29,7 @@ if TYPE_CHECKING:
from .window import Window # noqa
def handle_cmd(boss: 'Boss', window: 'Window', serialized_cmd: str) -> Optional[Dict[str, Any]]:
def handle_cmd(boss: 'Boss', window: Optional['Window'], serialized_cmd: str) -> Optional[Dict[str, Any]]:
cmd = json.loads(serialized_cmd)
v = cmd['version']
no_response = cmd.get('no_response', False)