Skip to content

Commit

Permalink
Merge pull request #75 from auscompgeek/enum-underscores
Browse files Browse the repository at this point in the history
Remove trailing underscore from enum variant names
  • Loading branch information
virtuald committed Dec 4, 2018
2 parents 575d5f5 + 61d6ae8 commit acb40bd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gen/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@ def header_hook(header, data):
name = v['name']
if name.startswith(ename):
name = name[len(ename):]
name = name.rstrip('_')
if name == 'None':
name = 'None_'
try:
int(name[0])
elif name[0].isdigit():
name = v['name'][0] + name
except ValueError:
pass
v['x_name'] = name

def function_hook(fn, data):
Expand Down

0 comments on commit acb40bd

Please sign in to comment.