Add type checking for the various CLI options objects

This commit is contained in:
Kovid Goyal
2020-03-05 15:47:12 +05:30
parent 0f4e7921ee
commit f05890719d
27 changed files with 487 additions and 157 deletions

View File

@@ -6,6 +6,7 @@
import sys
from kitty.cli import parse_args
from kitty.cli_stub import ResizeCLIOptions
from kitty.cmds import cmap, parse_subcommand_cli
from kitty.constants import version
from kitty.key_encoding import CTRL, RELEASE, key_defs as K
@@ -119,7 +120,7 @@ The base vertical increment.
def main(args):
msg = 'Resize the current window'
try:
args, items = parse_args(args[1:], OPTIONS, '', msg, 'resize_window')
args, items = parse_args(args[1:], OPTIONS, '', msg, 'resize_window', result_class=ResizeCLIOptions)
except SystemExit as e:
if e.code != 0:
print(e.args[0], file=sys.stderr)