mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
We require python 3.8 so no need to guard typing.Literal
This commit is contained in:
@@ -368,12 +368,8 @@ def generate_class(defn: Definition, loc: str) -> Tuple[str, str]:
|
||||
output_imports(imports)
|
||||
a('')
|
||||
if choices:
|
||||
a('if typing.TYPE_CHECKING:')
|
||||
for name, cdefn in choices.items():
|
||||
a(f' {name} = {cdefn}')
|
||||
a('else:')
|
||||
for name in choices:
|
||||
a(f' {name} = str')
|
||||
a(f'{name} = {cdefn}')
|
||||
|
||||
a('')
|
||||
a('option_names = ( # {{''{')
|
||||
|
||||
Reference in New Issue
Block a user