Feat: rename var_list to template
This commit is contained in:
parent
aad2395a3a
commit
b43c64fc7e
@ -19,7 +19,7 @@ DEFAUTL_CONFIG = {
|
|||||||
|
|
||||||
|
|
||||||
def list_generator(
|
def list_generator(
|
||||||
var_list: list[str],
|
template: list[str],
|
||||||
conditions: list[str] = [],
|
conditions: list[str] = [],
|
||||||
global_config: dict = {},
|
global_config: dict = {},
|
||||||
configs: dict = {},
|
configs: dict = {},
|
||||||
@ -56,9 +56,9 @@ def list_generator(
|
|||||||
>>> a not in [2, 3, 5, 7]
|
>>> a not in [2, 3, 5, 7]
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
rv = extract_letters(var_list)
|
rv = extract_letters(template)
|
||||||
rv_gen = random_generator(
|
rv_gen = random_generator(
|
||||||
rv, conditions, dict(DEFAUTL_CONFIG, **global_config), configs
|
rv, conditions, dict(DEFAUTL_CONFIG, **global_config), configs
|
||||||
)
|
)
|
||||||
generated = eval_words(var_list, rv_gen)
|
generated = eval_words(template, rv_gen)
|
||||||
return [generated[v] for v in var_list]
|
return [generated[v] for v in template]
|
||||||
|
Loading…
Reference in New Issue
Block a user