From f2955bfdfab570f2f01059cc5b8a8347b023d31c Mon Sep 17 00:00:00 2001 From: Alex Schofield Date: Sun, 2 Mar 2025 18:02:58 +0000 Subject: change external variable `path` used in FileHandler methods --- gdpr_obfuscator/read.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdpr_obfuscator/read.py') diff --git a/gdpr_obfuscator/read.py b/gdpr_obfuscator/read.py index a3761ae..dd8d48c 100644 --- a/gdpr_obfuscator/read.py +++ b/gdpr_obfuscator/read.py @@ -14,21 +14,21 @@ class FileHandler: def __init__(self): self.utils = Utilities() - def read_local(self, path) -> List[Dict[str, str]]: + def read_local(self, file_path) -> List[Dict[str, str]]: """ A method to read a local CSV file and return the data as a list of dictionaries. """ - with open(path, mode="r", encoding="utf-8") as f: + with open(file_path, mode="r", encoding="utf-8") as f: return self.read_string(f.read()) - def read_s3(self, path) -> List[Dict[str, str]]: + def read_s3(self, file_path) -> List[Dict[str, str]]: """ A method to read an S3 object containing CSV data and return the data as a list of dictionaries. """ - bucket, key = self.utils.get_s3_path(path) + bucket, key = self.utils.get_s3_path(file_path) client = boto3.client("s3") -- cgit v1.2.3