From ab94c2fbfac3765908a34ec504566d300b804de8 Mon Sep 17 00:00:00 2001 From: apollorion Date: Tue, 28 May 2024 12:51:47 -0400 Subject: [PATCH] fix: write_column should be a list --- .editorconfig | 3 +++ README.md | 1 + spacemk/exporters/base.py | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7d07822..edf4f36 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ insert_final_newline = true indent_size = 2 indent_style = space trim_trailing_whitespace = true + +[*.py] +indent_size = 4 diff --git a/README.md b/README.md index b72d0a5..819b010 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ methods in GitHub). - Go to the Migration Kit folder: `spacelift-migration-kit`. - Install the Python dependencies and the `spacemk` command in a Python virtual environment: `poetry install`. + - To install poetry: `pip install poetry`. - Activate the Python virtual environment: `poetry shell`. ## Usage diff --git a/spacemk/exporters/base.py b/spacemk/exporters/base.py index cc10cee..4dec72d 100644 --- a/spacemk/exporters/base.py +++ b/spacemk/exporters/base.py @@ -163,11 +163,11 @@ def _save_report_to_file(self, data: dict) -> None: column = 0 for key, value in sorted(pivoted_entity_type_data.items()): # Skip data structures - if type(value) in [dict, list, tuple, set]: + if type(value) in [dict, tuple, set]: continue worksheet.write(0, column, key) - worksheet.write_column(1, column, value) + worksheet.write_column(1, column, value if type(value) is list else [value]) column += 1 workbook.close()