Renamed some stuff
This commit is contained in:
parent
4cbf4df572
commit
97d250ca27
1 changed files with 2 additions and 4 deletions
|
@ -25,12 +25,10 @@ class NameGenerator(object):
|
||||||
Generates one name using the specified templates.
|
Generates one name using the specified templates.
|
||||||
If no templates are specified, use a random template from the default_templates list.
|
If no templates are specified, use a random template from the default_templates list.
|
||||||
"""
|
"""
|
||||||
template = self.templates[template or random.choice(self.default_templates)]
|
name = self.templates[template or random.choice(self.default_templates)]
|
||||||
|
|
||||||
# get a list of all name parts we need
|
# get a list of all name parts we need
|
||||||
name_parts = TEMPLATE_RE.findall(template)
|
name_parts = TEMPLATE_RE.findall(name)
|
||||||
|
|
||||||
name = template
|
|
||||||
|
|
||||||
for name_part in name_parts:
|
for name_part in name_parts:
|
||||||
part = random.choice(self.parts[name_part])
|
part = random.choice(self.parts[name_part])
|
||||||
|
|
Reference in a new issue