mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
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:
@@ -671,6 +671,7 @@ Follow these guidelines:
|
|||||||
copied_data = self.model_dump(exclude=exclude)
|
copied_data = self.model_dump(exclude=exclude)
|
||||||
copied_data = {k: v for k, v in copied_data.items() if v is not None}
|
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:
|
if self.context is NOT_SPECIFIED:
|
||||||
cloned_context = self.context
|
cloned_context = self.context
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1271,7 +1271,7 @@ def test_create_directory_false():
|
|||||||
assert not resolved_dir.exists()
|
assert not resolved_dir.exists()
|
||||||
|
|
||||||
with pytest.raises(
|
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")
|
task._save_file("test content")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user