Fix missing import (#588)

This commit is contained in:
Nathan Thomas 2024-01-23 17:57:13 -08:00 committed by GitHub
parent c6b29c2fab
commit c2b4c38e2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
from string import printable
from pathvalidate import sanitize_filename # type: ignore
from pathvalidate import sanitize_filename, sanitize_filepath # type: ignore
ALLOWED_CHARS = set(printable)
@ -12,6 +12,7 @@ def clean_filename(fn: str, restrict: bool = False) -> str:
return path
def clean_filepath(fn: str, restrict: bool = False) -> str:
path = str(sanitize_filepath(fn))
if restrict: