From ececce172ec04298b83b5551d65242795a8c74b7 Mon Sep 17 00:00:00 2001 From: kingbri Date: Mon, 16 Sep 2024 23:06:01 -0400 Subject: [PATCH] Config: Fix addition of preamble Remove the extraneous newlines from the beginning of the preamble. Signed-off-by: kingbri --- common/tabby_config.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/tabby_config.py b/common/tabby_config.py index 8bec9ed..01ad200 100644 --- a/common/tabby_config.py +++ b/common/tabby_config.py @@ -172,8 +172,8 @@ def generate_config_file( ) -> None: """Creates a config.yml file from Pydantic models.""" - # Add a preamble - yaml = dedent(""" + # Add a cleaned up preamble + preamble = """ # Sample YAML file for configuration. # Comment and uncomment values as needed. # Every value has a default within the application. @@ -181,7 +181,10 @@ def generate_config_file( # Unless specified in the comments, DO NOT put these options in quotes! # You can use https://www.yamllint.com/ if you want to check your YAML formatting.\n - """) + """ + + # Trim and cleanup preamble + yaml = dedent(preamble).lstrip() schema = unwrap(model, TabbyConfigModel())