fix: better support of not_for_commandline feature

This commit is contained in:
egarette@silique.fr 2025-01-04 12:01:08 +01:00
parent 0fea822c91
commit e7e9687b8d
6 changed files with 4 additions and 21 deletions

View file

@ -287,6 +287,7 @@ base_option_name:
not_export_with_import: not_export_with_import:
description: {_("In cache file, do not importation of Tiramisu and other dependencies")} description: {_("In cache file, do not importation of Tiramisu and other dependencies")}
negative_description: {_("In cache file, do importation of Tiramisu and other dependencies")}
default: false default: false
commandline: false commandline: false

View file

@ -425,7 +425,7 @@ class ParserVariable:
raise Exception( raise Exception(
f'cannot redefine the inexisting family "{path}" in {filename}' f'cannot redefine the inexisting family "{path}" in {filename}'
) )
if exists is True: if not self.load_unexist_redefine and exists is True:
return return
extra_attrs = set(family_obj) - self.family_attrs extra_attrs = set(family_obj) - self.family_attrs
if extra_attrs: if extra_attrs:

View file

@ -50,7 +50,7 @@ class Annotator(Walk):
self.not_for_commandline(variable) self.not_for_commandline(variable)
else: else:
self.manage_alternative_name(variable) self.manage_alternative_name(variable)
self.manage_negative_description(variable) self.manage_negative_description(variable)
def not_for_commandline(self, variable) -> None: def not_for_commandline(self, variable) -> None:
self.objectspace.properties.add(variable.path, "not_for_commandline", True) self.objectspace.properties.add(variable.path, "not_for_commandline", True)

View file

@ -30,6 +30,7 @@ structural_commandline:
add_extra_options: add_extra_options:
description: Add extra options to tiramisu-cmdline-parser description: Add extra options to tiramisu-cmdline-parser
negative_description: Remove extra options to tiramisu-cmdline-parser
default: true default: true
""" """
return { return {

View file

@ -1,19 +0,0 @@
"""
Silique (https://www.silique.fr)
Copyright (C) 2024
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from .update import RougailUpgrade