Skip to content

Commit

Permalink
Fix type hints on sanitize_filename utility
Browse files Browse the repository at this point in the history
  • Loading branch information
xoriole committed Aug 1, 2023
1 parent ecd597b commit 8b5ca87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tribler/gui/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,6 @@ def get_objects_with_predicate(data_item: Dict, predicate: ResourceType) -> List
return [stmt["object"] for stmt in data_item.get("statements", ()) if stmt["predicate"] == predicate]


def sanitize_filename(filename: str):
def sanitize_filename(filename: str) -> str:
"""Removes some selected escape characters from the filename and returns the cleaned value."""
return re.sub(r'[\n\r\t]', '', filename)

0 comments on commit 8b5ca87

Please sign in to comment.