diff options
| author | Alex Schofield <git@ajschof.me> | 2025-02-19 03:22:26 +0000 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2025-02-19 03:22:26 +0000 |
| commit | 3c4b66e8490c6fdf93fb8fee735d52c76eb2853b (patch) | |
| tree | 67f3d2c401b4b0e77d18f259ba2d788f1fcfcd84 /obfuscator/obfuscate.py | |
| parent | ef05a027ffbf8bbee89bb031ccd6152de49762c6 (diff) | |
| download | gdpr-obfuscator-3c4b66e8490c6fdf93fb8fee735d52c76eb2853b.tar.gz gdpr-obfuscator-3c4b66e8490c6fdf93fb8fee735d52c76eb2853b.zip | |
remove annoying comments for better readability of code
Diffstat (limited to 'obfuscator/obfuscate.py')
| -rw-r--r-- | obfuscator/obfuscate.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/obfuscator/obfuscate.py b/obfuscator/obfuscate.py index 4f7e6c1..e964433 100644 --- a/obfuscator/obfuscate.py +++ b/obfuscator/obfuscate.py @@ -1,7 +1,6 @@ from typing import List, Dict from obfuscator.logger import get_logger -# Create the logger logger = get_logger("OBFUSCATE") @@ -12,14 +11,10 @@ def obfuscate( A function to obfuscate PII fields in a list of dictionaries, replacing sensitive values with a string of asterisks. """ - # If no data is provided, log a message and return an empty list if not data: logger.info("No valid data was provided to obfuscate") return [] - # Obfuscate the PII fields in each record using a list/dict comprehension - # This code is good but makes debugging a bit tricky. I may consider - # breaking it down into a for loop. return [ {k: ("***" if k in pii_fields else v) for k, v in record.items()} for record in data |
