Fix a gen-config bug that was causing macos shortcuts to be defined on linux as well

This commit is contained in:
Kovid Goyal
2021-06-05 10:14:30 +05:30
parent 4cff3e51cb
commit 0bade29c25
2 changed files with 3 additions and 40 deletions

View File

@@ -270,8 +270,9 @@ def generate_class(defn: Definition, loc: str) -> Tuple[str, str]:
text = sc.parseable_text
if sc.only:
only.setdefault(sc.only, []).append((text, func))
for val in func(text):
a(f' {val!r},')
else:
for val in func(text):
a(f' {val!r},')
a(']')
if only:
imports.add(('kitty.constants', 'is_macos'))