diff options
| author | deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> | 2025-02-17 01:17:37 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-17 01:17:37 +0000 |
| commit | cf1376862fb2f58c2e837338ed9c765439ffa1b9 (patch) | |
| tree | 4331016762f96c0861b46ac67343a0769f038fa6 | |
| parent | f612f71ef5d09ce93526b4268173c612f06ae701 (diff) | |
| download | gdpr-obfuscator-cf1376862fb2f58c2e837338ed9c765439ffa1b9.tar.gz gdpr-obfuscator-cf1376862fb2f58c2e837338ed9c765439ffa1b9.zip | |
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
| -rw-r--r-- | obfuscator/csv_reader.py | 5 | ||||
| -rw-r--r-- | 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) |
