From dc8c0221e70deb6973287bd5fb5049bdad71acd4 Mon Sep 17 00:00:00 2001 From: penev92 Date: Wed, 7 Sep 2022 12:29:14 +0300 Subject: [PATCH] Fixed documentation Python script handling of null The script would serialize null values as "None" in the Markdown files it produces, which is not great. It's better to leave empty strings. --- packaging/format-docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/format-docs.py b/packaging/format-docs.py index 2fc7fbee4e..859c8f8317 100644 --- a/packaging/format-docs.py +++ b/packaging/format-docs.py @@ -83,7 +83,7 @@ def format_docs(version, collectionName, types): print(f'| {prop["PropertyName"]} | {defaultValue} | {prop["UserFriendlyType"]} | {prop["Description"]} |') else: - print(f'| {prop["PropertyName"]} | {prop["DefaultValue"]} | {prop["UserFriendlyType"]} | {prop["Description"]} |') + print(f'| {prop["PropertyName"]} | {prop["DefaultValue"] or ""} | {prop["UserFriendlyType"]} | {prop["Description"]} |') if __name__ == "__main__": input_stream = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8-sig')