Type: Stabilize attribute and alias output in statements.
Sort attributes and aliases in Type.statement(). Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
This commit is contained in:
parent
525cc9069f
commit
a9e65732f2
|
@ -107,11 +107,11 @@ cdef class Type(BaseType):
|
|||
|
||||
stmt = f"type {self.name}"
|
||||
if count > 1:
|
||||
stmt += f" alias {{ {' '.join(self._aliases)} }}"
|
||||
stmt += f" alias {{ {' '.join(sorted(self._aliases))} }}"
|
||||
elif count == 1:
|
||||
stmt += f" alias {self._aliases[0]}"
|
||||
for attr in self._attrs:
|
||||
stmt += f", {attr}"
|
||||
if self._attrs:
|
||||
stmt += f", {', '.join(a.name for a in sorted(self._attrs))}"
|
||||
stmt += ";"
|
||||
return stmt
|
||||
|
||||
|
|
Loading…
Reference in New Issue