Exemple #1
0
def change_structure():
    """Change structural rule."""
    menu_file = os.path.join(_data_dir, "Menus", "Change_StructuralRule.json")
    menu = Menu(file=menu_file)
    Settings().print_rules()
    rule = menu.open()
    if rule:
        Rules.change_structure(rule)
Exemple #2
0
def change_single():
    """Change single rule."""
    menu_file = os.path.join(_data_dir, "Menus", "Change_SingleRule.json")
    rule_menu = Menu(file=menu_file)
    Settings().print_rules()
    rule = rule_menu.open()
    if rule:
        Rules.change_single(rule)
Exemple #3
0
def change_multiple():
    """Change multiple rules."""
    rule_file = os.path.join(_data_dir, "Menus", "Change_MultipleRules.json")
    rules_menu = Menu(file=rule_file)
    Settings().print_rules()
    group = rules_menu.open()

    mode_file = os.path.join(_data_dir, "Menus", "Change_RuleMode.json")
    mode_menu = Menu(file=mode_file)
    mode = mode_menu.open()
    if group and mode:
        Rules.change_multiple(group, mode)
 def setUp(self) -> None:
     Rules.change_multiple("", "Invertible")