Adjust formatting for live.yaml
This commit is contained in:
parent
ff0d81f32c
commit
b856d90d14
1 changed files with 15 additions and 1 deletions
16
check.py
16
check.py
|
|
@ -302,6 +302,13 @@ def find_new_conference_web_sites(
|
||||||
return new
|
return new
|
||||||
|
|
||||||
|
|
||||||
|
class NoAliasDumper(yaml.SafeDumper):
|
||||||
|
"""Dumper that disables YAML anchors and aliases."""
|
||||||
|
def ignore_aliases(self, data):
|
||||||
|
"""Skip alias generation."""
|
||||||
|
return True # disables anchors and aliases
|
||||||
|
|
||||||
|
|
||||||
def main(show_not_live: bool = False) -> None:
|
def main(show_not_live: bool = False) -> None:
|
||||||
"""Check fow new conference web sites."""
|
"""Check fow new conference web sites."""
|
||||||
live: list[LiveConference] = load_yaml("live")
|
live: list[LiveConference] = load_yaml("live")
|
||||||
|
|
@ -310,7 +317,14 @@ def main(show_not_live: bool = False) -> None:
|
||||||
|
|
||||||
live_filename = os.path.expanduser(config["data"]["live"])
|
live_filename = os.path.expanduser(config["data"]["live"])
|
||||||
with open(live_filename, "w") as out:
|
with open(live_filename, "w") as out:
|
||||||
yaml.dump(live + new, stream=out, sort_keys=False)
|
yaml.dump(
|
||||||
|
live + new,
|
||||||
|
stream=out,
|
||||||
|
sort_keys=False,
|
||||||
|
Dumper=NoAliasDumper,
|
||||||
|
allow_unicode=True,
|
||||||
|
default_flow_style=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue