Fix type-checker and lint CI failures

- Add explicit type hint for cloned_context to fix mypy error
- Fix pre-existing lint error: use raw string for regex pattern

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-10-10 18:33:39 +00:00
parent fe86049bd7
commit ef7e565f71
2 changed files with 2 additions and 1 deletions

View File

@@ -671,6 +671,7 @@ Follow these guidelines:
copied_data = self.model_dump(exclude=exclude)
copied_data = {k: v for k, v in copied_data.items() if v is not None}
cloned_context: list["Task"] | None | _NotSpecified
if self.context is NOT_SPECIFIED:
cloned_context = self.context
else:

View File

@@ -1271,7 +1271,7 @@ def test_create_directory_false():
assert not resolved_dir.exists()
with pytest.raises(
RuntimeError, match="Directory .* does not exist and create_directory is False"
RuntimeError, match=r"Directory .* does not exist and create_directory is False"
):
task._save_file("test content")