docs: clarify behavior of extract_remote_path with multiple 'processed' dirs

Added detailed docstring explaining that the function only removes the first
occurrence of 'processed' from the path, not all occurrences. This documents
the current implementation behavior.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-15 10:28:44 +00:00
parent 53d77d781d
commit 89bfbbef8f
+6 -1
View File
@@ -487,7 +487,12 @@ class TestExtractRemotePathEdgeCases:
assert result == "remote/file.pdf"
def test_multiple_processed_directories(self):
"""Test path with multiple 'processed' directories."""
"""Test path with multiple 'processed' directories.
The function uses list.remove() which only removes the FIRST occurrence
of 'processed' in the path. This is the current implementation behavior.
If all occurrences should be removed, the function would need to be updated.
"""
from app.utils.filename_utils import extract_remote_path
result = extract_remote_path("/base/processed/subdir/processed/file.pdf", "/base", "/remote")