From 8b5ca874a02797af9bfb2ff22a3cc31a7d7673f5 Mon Sep 17 00:00:00 2001 From: Sandip Pandey Date: Thu, 20 Jul 2023 16:00:46 +0200 Subject: [PATCH] Fix type hints on sanitize_filename utility --- src/tribler/gui/utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tribler/gui/utilities.py b/src/tribler/gui/utilities.py index 18e54c5cee7..1c1f906e0c2 100644 --- a/src/tribler/gui/utilities.py +++ b/src/tribler/gui/utilities.py @@ -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)