Skip to content

Commit

Permalink
add newlines after docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Krish Patel committed Jun 21, 2023
1 parent b25c102 commit 60dceb2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openadapt/scrub.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def scrub_text(text: str, is_separated: bool = False) -> str:
Returns:
str: Scrubbed text
"""

if text is None:
return None

Expand Down Expand Up @@ -100,6 +101,7 @@ def scrub_image(
Returns:
PIL.Image: The scrubbed image with PII and PHI removed.
"""

redacted_image = IMAGE_REDACTOR.redact(
image, fill=fill_color, entities=SCRUBBING_ENTITIES
)
Expand Down Expand Up @@ -159,6 +161,7 @@ def _scrub_text_item(
Returns:
str: The scrubbed value
"""

if key in ("text", "canonical_text"):
return scrub_text(value, is_separated=True)
if force_scrub_children:
Expand Down Expand Up @@ -203,6 +206,7 @@ def _scrub_list_item(
Returns:
dict/str: The scrubbed dict/value respectively
"""

if isinstance(item, dict):
return scrub_dict(
item, list_keys, force_scrub_children=force_scrub_children
Expand All @@ -225,6 +229,7 @@ def scrub_dict(
Returns:
dict: The scrubbed dict with PII and PHI removed.
"""

if list_keys is None:
list_keys = config.SCRUB_KEYS_HTML

Expand Down Expand Up @@ -270,6 +275,7 @@ def scrub_list_dicts(input_list: List[Dict], list_keys: List = None) -> List[Dic
Returns:
list[dict]: The scrubbed list of dicts with PII and PHI removed.
"""

scrubbed_list_dicts = []
for input_dict in input_list:
scrubbed_list_dicts.append(scrub_dict(input_dict, list_keys))
Expand Down

0 comments on commit 60dceb2

Please sign in to comment.