Follow the config parser way part4
This commit is contained in:
@@ -68,7 +68,7 @@ def get_int_list(section : str, option : str, fallback : Optional[str] = None) -
|
|||||||
config_parser = get_config_parser()
|
config_parser = get_config_parser()
|
||||||
|
|
||||||
if config_parser.has_option(section, option) and config_parser.get(section, option).strip():
|
if config_parser.has_option(section, option) and config_parser.get(section, option).strip():
|
||||||
return [ cast_int(value) for value in config_parser.get(section, option).split() ]
|
return list(map(int, config_parser.get(section, option).split()))
|
||||||
if fallback:
|
if fallback:
|
||||||
return [ cast_int(value) for value in fallback.split() ]
|
return list(map(int, fallback.split()))
|
||||||
return None
|
return None
|
||||||
|
|||||||
@@ -39,11 +39,6 @@ def before_all() -> None:
|
|||||||
{
|
{
|
||||||
'valid': '1 2 3',
|
'valid': '1 2 3',
|
||||||
'unset': ''
|
'unset': ''
|
||||||
},
|
|
||||||
'float_list':
|
|
||||||
{
|
|
||||||
'valid': '1.0 2.0 3.0',
|
|
||||||
'unset': ''
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user