From d682e2ae03e254f6b58e9b27d3867a921bb0597f Mon Sep 17 00:00:00 2001 From: Abhinav Tarigoppula Date: Fri, 29 May 2026 10:23:00 +0530 Subject: [PATCH] docs: fix duplicate "mode mode" word in crewai-files docstrings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed 8 accidental "mode mode" duplicate-word typos across 3 files, all in docstrings (class/method documentation and test descriptions): - crewai_files/core/types.py — BaseFile class docstring - crewai_files/processing/processor.py — FileProcessor class and methods (_get_mode, process docstrings) - tests/utilities/test_files.py — test_file_custom_mode and test_file_chunk_mode docstrings Pure docstring fixes — no behavior change. --- lib/crewai-files/src/crewai_files/core/types.py | 2 +- .../src/crewai_files/processing/processor.py | 10 +++++----- lib/crewai/tests/utilities/test_files.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/crewai-files/src/crewai_files/core/types.py b/lib/crewai-files/src/crewai_files/core/types.py index 84e3a90c3d..c76c33164a 100644 --- a/lib/crewai-files/src/crewai_files/core/types.py +++ b/lib/crewai-files/src/crewai_files/core/types.py @@ -163,7 +163,7 @@ class BaseFile(ABC, BaseModel): - File source management - Content reading - Dict unpacking support (`**` syntax) - - Per-file mode mode + - Per-file mode Can be unpacked with ** syntax: `{**ImageFile(source="./chart.png")}` which unpacks to: `{"chart": }` using filename stem as key. diff --git a/lib/crewai-files/src/crewai_files/processing/processor.py b/lib/crewai-files/src/crewai_files/processing/processor.py index afb7fbbde6..cdfe4771ad 100644 --- a/lib/crewai-files/src/crewai_files/processing/processor.py +++ b/lib/crewai-files/src/crewai_files/processing/processor.py @@ -39,11 +39,11 @@ class FileProcessor: - """Processes files according to provider constraints and per-file mode mode. + """Processes files according to provider constraints and per-file mode. Validates files against provider-specific limits and optionally transforms them (resize, compress, chunk) to meet those limits. Each file specifies - its own mode mode via `file.mode`. + its own mode via `file.mode`. Attributes: constraints: Provider constraints for validation. @@ -90,13 +90,13 @@ def validate(self, file: FileInput) -> Sequence[str]: @staticmethod def _get_mode(file: FileInput) -> FileHandling: - """Get the mode mode for a file. + """Get the mode for a file. Args: file: The file to get mode for. Returns: - The file's mode mode, defaulting to AUTO. + The file's mode, defaulting to AUTO. """ mode = getattr(file, "mode", None) if mode is None: @@ -108,7 +108,7 @@ def _get_mode(file: FileInput) -> FileHandling: return FileHandling.AUTO def process(self, file: FileInput) -> FileInput | Sequence[FileInput]: - """Process a single file according to constraints and its mode mode. + """Process a single file according to constraints and its mode. Args: file: The file to process. diff --git a/lib/crewai/tests/utilities/test_files.py b/lib/crewai/tests/utilities/test_files.py index e40215053a..668a8b4da5 100644 --- a/lib/crewai/tests/utilities/test_files.py +++ b/lib/crewai/tests/utilities/test_files.py @@ -494,13 +494,13 @@ def test_file_default_mode(self) -> None: assert f.mode == "auto" def test_file_custom_mode(self) -> None: - """Test File with custom mode mode.""" + """Test File with custom mode.""" f = File(source=b"content", mode="strict") assert f.mode == "strict" def test_file_chunk_mode(self) -> None: - """Test File with chunk mode mode.""" + """Test File with chunk mode.""" f = File(source=b"content", mode="chunk") assert f.mode == "chunk"