From cf1376862fb2f58c2e837338ed9c765439ffa1b9 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 01:17:37 +0000 Subject: style: format code with Autopep8, Black and Ruff Formatter This commit fixes the style issues introduced in f612f71 according to the output from Autopep8, Black and Ruff Formatter. Details: https://github.com/ajschofield/gdpr-obfuscator/pull/1 --- obfuscator/csv_reader.py | 5 +++-- test/test_csv_reader.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/obfuscator/csv_reader.py b/obfuscator/csv_reader.py index 3b4496b..b9dccdb 100644 --- a/obfuscator/csv_reader.py +++ b/obfuscator/csv_reader.py @@ -5,6 +5,7 @@ from obfuscator.logger import get_logger logger = get_logger("CSVReader") + class CSVReader: @staticmethod def read_local(path) -> List[Dict[str, str]]: @@ -18,7 +19,7 @@ class CSVReader: logger.error(f"File not found: {path}") except Exception as e: logger.error(f"Error reading file: {e}") - + @staticmethod def read_s3(path) -> List[Dict[str, str]]: return [] @@ -27,7 +28,7 @@ class CSVReader: def read_string(content: str) -> List[Dict[str, str]]: if not content.strip(): return [] - + f = io.StringIO(content) reader = csv.DictReader(f) return [dict(row) for row in reader] diff --git a/test/test_csv_reader.py b/test/test_csv_reader.py index 48a808c..e62c093 100644 --- a/test/test_csv_reader.py +++ b/test/test_csv_reader.py @@ -6,6 +6,7 @@ import pytest reader = CSVReader() + def test_empty_csv_should_return_no_content(): content = "" result = reader.read_string(content) -- cgit v1.2.3