trainwave-cli 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trainwave-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary:
5
5
  Author: Johan Backman
6
6
  Author-email: johan@trainwave.ai
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "trainwave-cli"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = ""
5
5
  authors = ["Johan Backman <johan@trainwave.ai>"]
6
6
  readme = "README.md"
@@ -97,14 +97,18 @@ async def default(
97
97
  f"You already have a config file({config_path}). Do you want to overwrite it?"
98
98
  )
99
99
 
100
+ merged_config = existing_config | new_config
101
+ # Make sure everything has a value
102
+ merged_config = {k: v for k, v in merged_config.items() if v}
103
+
100
104
  if confirmed:
101
105
  with open(config_path, "w") as f:
102
106
  # Merge and dump
103
- toml.dump(existing_config | new_config, f)
107
+ toml.dump(merged_config, f)
104
108
 
105
109
  typer.echo(f"Config file saved to {config_path}.")
106
110
  else:
107
111
  typer.echo("Config file not saved to file. \n")
108
112
 
109
113
  typer.echo("Config: \n")
110
- typer.echo(toml.dumps(existing_config | new_config))
114
+ typer.echo(toml.dumps(merged_config))
File without changes