style: fix linting issues (whitespace and formatting)

- Remove trailing whitespace from blank lines
- Apply black formatting to test file
- All tests still pass

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-09 21:05:44 +00:00
parent 43b512fee8
commit 3d2b21b3c8
2 changed files with 113 additions and 143 deletions
+2 -2
View File
@@ -88,11 +88,11 @@ def sanitize_filename(filename):
"""
# First, replace all path separators (both Unix and Windows style) with underscores
sanitized = filename.replace("/", "_").replace("\\", "_")
# Replace characters that are problematic in various filesystems
# Keep only alphanumeric, dash, underscore, period, and space
sanitized = re.sub(r"[^\w\-\. ]", "_", sanitized)
# Remove or replace path traversal patterns
# Replace specifically '..' to prevent path traversal while preserving single dots
sanitized = sanitized.replace("..", "_")