diff options
| author | Alex Schofield <git@ajschof.me> | 2025-02-11 23:14:30 +0000 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2025-02-11 23:14:30 +0000 |
| commit | ac27aaea71cb9a035446f50d3dc0148ec144ec88 (patch) | |
| tree | e6a65b91be7823f2c17466540936ac725eae23d8 | |
| parent | 4452e3afd4fb6c7f6c3f44c90be64908aa2c67fb (diff) | |
| download | gdpr-obfuscator-ac27aaea71cb9a035446f50d3dc0148ec144ec88.tar.gz gdpr-obfuscator-ac27aaea71cb9a035446f50d3dc0148ec144ec88.zip | |
add type checking to csv_reader function
| -rw-r--r-- | src/csv_reader.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/csv_reader.py b/src/csv_reader.py index 81f1485..23afc66 100644 --- a/src/csv_reader.py +++ b/src/csv_reader.py @@ -1,7 +1,8 @@ import csv from io import StringIO +from typing import List, Dict -def csv_reader(file): - f = StringIO(file) +def csv_reader(content: str) -> List[Dict[str, str]]: + f = StringIO(content) reader = csv.DictReader(f) return list(reader) |
