This commit is contained in:
gwen 2024-09-10 09:51:22 +02:00
parent 27b251b5f6
commit fe86a214de

View file

@ -82,21 +82,16 @@ class RougailUserDataEnvironment:
unused_environment_var_str = " ".join(self.unused_environment_var) unused_environment_var_str = " ".join(self.unused_environment_var)
self.warnings.append("the rougail environment variables were not used : " + unused_environment_var_str) self.warnings.append("the rougail environment variables were not used : " + unused_environment_var_str)
def parse(self, config, title_level=0): def parse(self, config):
for option in config: for option in config:
if option.isoptiondescription(): if option.isoptiondescription():
self.print(option.description(), title_level) self.print(option.description(), title_level)
self.parse(option, title_level + 1) self.parse(option, title_level + 1)
else: else:
self.display_environment(option) self.load_environment(option)
def print(self, title, title_level): def load_environment(self, option):
print(' ' * title_level + '📂 ' + title, 'bold')
def display_environment(self, option):
kwargs = {}
option_type = option.information.get('type') option_type = option.information.get('type')
default = option.value.get()
ismulti = option.ismulti() ismulti = option.ismulti()
# here we retrieve the conversion func of the considered type # here we retrieve the conversion func of the considered type
# carefull, it could be None -> in this case, do nothing # carefull, it could be None -> in this case, do nothing