This commit is contained in:
Iain Learmonth 2023-01-21 15:18:13 +00:00
parent 10ffdff2c3
commit 20fad30a06
4 changed files with 4 additions and 4 deletions

View file

@ -32,7 +32,7 @@ class Bridgelines(BaseModel):
title = "Bridgelines Version 1"
def bridgelines(_, *, distribution_method: Optional[str] = None) -> Dict[str, Any]:
def bridgelines(_: Optional[Pool], *, distribution_method: Optional[str] = None) -> Dict[str, Any]:
bridges: Iterable[Bridge] = Bridge.query.filter(
Bridge.destroyed.is_(None),
Bridge.deprecated.is_(None),

View file

@ -35,7 +35,7 @@ class MirrorMapping(BaseModel):
title = "Mirror Mapping Version 1.1"
def mirror_mapping(_) -> Dict[str, Union[str, Dict[str, str]]]:
def mirror_mapping(_: Optional[Pool]) -> Dict[str, Union[str, Dict[str, str]]]:
return MirrorMapping(
version="1.1",
mappings={

View file

@ -42,7 +42,7 @@ def redirector_pool(pool: Pool) -> RedirectorPool:
)
def redirector_data(_) -> Dict[str, Union[str, Dict[str, Union[Dict[str, str]]]]]:
def redirector_data(_: Optional[Pool]) -> Dict[str, Union[str, Dict[str, Union[Dict[str, str]]]]]:
active_pools = Pool.query.filter(
Pool.destroyed.is_(None)
).all()

View file

@ -69,7 +69,7 @@ class ListAutomation(TerraformAutomation):
for obfuscate in [True, False]:
with open(os.path.join(
self.working_dir, f"{key}.{pool.pool_name}{'.jsno' if obfuscate else '.json'}"),
'w', encoding="utf-8") as out:
'w', encoding="utf-8") as out:
out.write(json_encode(formatter(pool), obfuscate))
with open(os.path.join(self.working_dir, f"{key}.{pool.pool_name}{'.jso' if obfuscate else '.js'}"),
'w', encoding="utf-8") as out: