diff --git a/tagstudio/src/qt/helpers/file_deleter.py b/tagstudio/src/qt/helpers/file_deleter.py index 104b7746..d8a36e34 100644 --- a/tagstudio/src/qt/helpers/file_deleter.py +++ b/tagstudio/src/qt/helpers/file_deleter.py @@ -1,10 +1,7 @@ import logging -import pathlib -import subprocess -import sys import traceback from pathlib import Path -from typing import Callable +from collections.abc import Callable ERROR = f"[ERROR]" WARNING = f"[WARNING]" @@ -12,7 +9,6 @@ INFO = f"[INFO]" logging.basicConfig(format="%(message)s", level=logging.INFO) - def delete_file(path: str | Path, callback: Callable): _path = str(path) _file = Path(_path) @@ -29,10 +25,10 @@ def delete_file(path: str | Path, callback: Callable): class FileDeleterHelper: def __init__(self, filepath: str | Path): - self.filepath = str(filepath) + self.filepath = filepath def set_filepath(self, filepath: str | Path): - self.filepath = str(filepath) + self.filepath = filepath def set_delete_callback(self, callback: Callable): self.delete_callback = callback