diff --git a/check.py b/check.py index b4b6383..61b46b1 100755 --- a/check.py +++ b/check.py @@ -302,6 +302,13 @@ def find_new_conference_web_sites( 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: """Check fow new conference web sites.""" 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"]) 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__":