aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex <git@ajschof.me>2025-02-21 04:23:25 +0000
committerGitHub <noreply@github.com>2025-02-21 04:23:25 +0000
commit202bc5c82f446c514c9673f51ff5c0bf9a410cca (patch)
tree84aed299417974437ab2dddecb561c7af7955a28
parent9bdeb7d3e8e68aa5da3ab29ec41b6ffd334be2b9 (diff)
parent7cc98bff4095bd06838c8aa6d18cf5f62aff1979 (diff)
downloadgdpr-obfuscator-202bc5c82f446c514c9673f51ff5c0bf9a410cca.tar.gz
gdpr-obfuscator-202bc5c82f446c514c9673f51ff5c0bf9a410cca.zip
Merge pull request #11 from ajschofield/deepsource-autofix-5fdb5f46
refactor: change methods not using its bound instance to staticmethods
-rw-r--r--gdpr_obfuscator/read.py3
-rw-r--r--gdpr_obfuscator/utils.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/gdpr_obfuscator/read.py b/gdpr_obfuscator/read.py
index e527a4f..27f2a3d 100644
--- a/gdpr_obfuscator/read.py
+++ b/gdpr_obfuscator/read.py
@@ -37,7 +37,8 @@ class DataReader:
read_csv_content = self.read_string(content)
return read_csv_content
- def read_string(self, content: str) -> List[Dict[str, str]]:
+ @staticmethod
+ def read_string(content: str) -> List[Dict[str, str]]:
"""
A method to read CSV data from a string and return the data as a list
of dictionaries.
diff --git a/gdpr_obfuscator/utils.py b/gdpr_obfuscator/utils.py
index d305daf..9736d7c 100644
--- a/gdpr_obfuscator/utils.py
+++ b/gdpr_obfuscator/utils.py
@@ -8,13 +8,15 @@ class Utilities:
def __init__(self, logger=None):
pass
- def get_s3_path(self, uri):
+ @staticmethod
+ def get_s3_path(uri):
parts = uri.replace("s3://", "").split("/")
bucket = parts.pop(0)
key = "/".join(parts)
return bucket, key
- def create_byte_stream(self, data: List[Dict[str, str]]) -> bytes:
+ @staticmethod
+ def create_byte_stream(data: List[Dict[str, str]]) -> bytes:
if not data:
return b""
git.ajschof.me — hosted by ajschofield — powered by cgit