mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-13 20:14:12 +02:00
more typing work
This commit is contained in:
@@ -402,6 +402,8 @@ def as_type_stub(seq: OptionSpecSeq, disabled: OptionSpecSeq, class_name: str, e
|
||||
otype = opt['type'] or 'str'
|
||||
if otype in ('str', 'int', 'float'):
|
||||
t = otype
|
||||
if t == 'str' and defval_for_opt(opt) is None:
|
||||
t = 'typing.Optional[str]'
|
||||
elif otype == 'list':
|
||||
t = 'typing.Sequence[str]'
|
||||
elif otype in ('choice', 'choices'):
|
||||
|
||||
Reference in New Issue
Block a user