Simplify argument parsing (#459)

With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
This commit is contained in:
Marc Wrobel
2025-07-06 22:42:01 +02:00
committed by GitHub
parent b105939f93
commit 391d65ad8a
61 changed files with 1091 additions and 1032 deletions

View File

@@ -85,6 +85,15 @@ class ProductFrontmatter:
return configs
def auto_config(self, method_filter: str, url_filter: str) -> AutoConfig:
configs = self.auto_configs(method_filter, url_filter)
if len(configs) != 1:
message = f"Expected a single auto config for {self.name} with method={method_filter} and url={url_filter}; got {len(configs)}"
raise ValueError(message)
return configs[0]
def get_title(self) -> str:
return self.data["title"]