Skip to content

Commit

Permalink
update regexp for keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
o-mishch committed Apr 2, 2020
1 parent 8d53846 commit e131215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/transformers/enums_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def extract_param(self, param: EnumElement, item_name: str):
if re.match(r'^[A-Z\d]+$', item):
name.append(item.title())
name = ''.join(name)
if any(re.search(r'^(sdl)?({})?{}$'.format(item_name.casefold(), name.casefold()), k) for k in self.key_words):
if any(re.search(r'^(sdl)?({}){}$'.format(item_name.casefold(), name.casefold()), k) for k in self.key_words):
name = self._replace_keywords(name)
data['name'] = name
return self.param_named(**data)

0 comments on commit e131215

Please sign in to comment.