Skip to content
Snippets Groups Projects
Commit 8e60f24b authored by matejcik's avatar matejcik
Browse files

fix test failures

parent 37cdb0df
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ class Names:
def __add__(self, other):
if isinstance(other, strtypes):
return Names(self.parts + (other,))
elif isinstance(other, Name):
elif isinstance(other, Names):
return Names(self.parts + other.parts)
elif isinstance(other, tuple):
return Names(self.parts + other)
......@@ -190,10 +190,13 @@ class Enum:
self.options = enum_options
self.names = names
# by definition, `names` include this enum's name
base_name = Names(names.parts[:-1])
if enum_options.long_names:
self.values = [(names + x.name, x.number) for x in desc.value]
else:
self.values = [(desc.name + x.name, x.number) for x in desc.value]
self.values = [(base_name + x.name, x.number) for x in desc.value]
self.value_longnames = [self.names + x.name for x in desc.value]
self.packed = enum_options.packed_enum
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment