From bbe897c944814eb909a074c812ccebe7364c98cf Mon Sep 17 00:00:00 2001 From: evilchili Date: Sat, 13 Aug 2022 12:56:58 -0700 Subject: [PATCH] perserve header ordering in yaml output --- pyproject.toml | 2 +- rolltable/tables.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c2dd8a8..e664103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = 'dnd-rolltable' -version = '1.1.4' +version = '1.1.5' license = 'The Unlicense' authors = ['Greg Boyington '] description = 'Generate roll tables using weighted random distributions' diff --git a/rolltable/tables.py b/rolltable/tables.py index fca4ce2..e98f3e9 100644 --- a/rolltable/tables.py +++ b/rolltable/tables.py @@ -102,7 +102,7 @@ class RollTable: cols = row[1:] + [''] * (len(self.headers) - len(row[1:])) for idx, col in enumerate(cols): struct[row[0]][self.headers[idx] if idx < len(self.headers) else '_'] = col - return yaml.dump(struct) + return yaml.dump(struct, sort_keys=False) @property def die(self) -> int: