Run autoformat after gen/config

This commit is contained in:
Kovid Goyal 2026-09-06 07:09:40 +05:30
parent f90c26f1d0
commit df2986feb3
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 1 deletions

View file

@ -73,6 +73,7 @@ def main(args: list[str] = sys.argv) -> None:
definition,
f'\nnullable_colors = frozenset({{\n {nc}\n}})\n\nspecial_colors = frozenset({{\n {sc}\n}})\n\nall_colors = frozenset({{\n {ac}\n}})\n',
)
os.execl(os.path.abspath('autoformat'), 'autoformat')
if __name__ == '__main__':

View file

@ -56,7 +56,7 @@ def generate_class(defn: Definition, loc: str) -> tuple[str, str]:
def option_type_data(option: Option | MultiOption) -> tuple[Callable[[Any], Any], str]:
func = option.parser_func
if func.__module__ == 'builtins':
return getattr(func, '__name__')
return func, getattr(func, '__name__')
th = get_type_hints(func)
rettype = th['return']
typ = option_type_as_str(rettype)