mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 20:52:19 +00:00
Add type annotations to rc protocol field definitions
This commit is contained in:
parent
6be3ae9efc
commit
f42d2c63a6
35 changed files with 147 additions and 142 deletions
|
|
@ -277,7 +277,7 @@ def write_remote_control_protocol_docs() -> None: # {{{
|
|||
from kitty.rc.base import (
|
||||
RemoteCommand, all_command_names, command_for_name
|
||||
)
|
||||
field_pat = re.compile(r'\s*([a-zA-Z0-9_+]+)\s*:\s*(.+)')
|
||||
field_pat = re.compile(r'\s*([a-zA-Z0-9_+/]+)\s*:\s*(.+)')
|
||||
|
||||
def format_cmd(p: Callable[..., None], name: str, cmd: RemoteCommand) -> None:
|
||||
p(name)
|
||||
|
|
@ -289,7 +289,7 @@ def write_remote_control_protocol_docs() -> None: # {{{
|
|||
if m is None:
|
||||
p(line)
|
||||
else:
|
||||
fields.append((m.group(1), m.group(2)))
|
||||
fields.append((m.group(1).split('/')[0], m.group(2)))
|
||||
if fields:
|
||||
p('\nFields are:\n')
|
||||
for (name, desc) in fields:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue