From 50330cf32f05e5e1afb65b51f4fd5c01391c3534 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Mon, 12 Aug 2024 19:32:14 +0200 Subject: [PATCH] Core: Remove broken unused code from Options.py (#3781) "Unused" is a baseless assertion, but this code path has been crashing on the first statement for 6 months and noone's complained --- Options.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/Options.py b/Options.py index e22ee1ee..ecde6275 100644 --- a/Options.py +++ b/Options.py @@ -1518,31 +1518,3 @@ def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], ge with open(os.path.join(target_folder, game_name + ".yaml"), "w", encoding="utf-8-sig") as f: f.write(res) - - -if __name__ == "__main__": - - from worlds.alttp.Options import Logic - import argparse - - map_shuffle = Toggle - compass_shuffle = Toggle - key_shuffle = Toggle - big_key_shuffle = Toggle - hints = Toggle - test = argparse.Namespace() - test.logic = Logic.from_text("no_logic") - test.map_shuffle = map_shuffle.from_text("ON") - test.hints = hints.from_text('OFF') - try: - test.logic = Logic.from_text("overworld_glitches_typo") - except KeyError as e: - print(e) - try: - test.logic_owg = Logic.from_text("owg") - except KeyError as e: - print(e) - if test.map_shuffle: - print("map_shuffle is on") - print(f"Hints are {bool(test.hints)}") - print(test)