cleaning
This commit is contained in:
parent
27b251b5f6
commit
fe86a214de
1 changed files with 3 additions and 8 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue