mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 23:58:34 +00:00
fix: restore typing imports to resolve F821 undefined name errors
- Add back Dict, List, Tuple, Type imports that are used throughout the code - Consolidate duplicate imports in llm.py - Match existing codebase patterns for type annotations - Maintain quota limit handling functionality while fixing CI issues Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -3,11 +3,14 @@ import subprocess
|
||||
import time
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
List,
|
||||
Literal,
|
||||
Optional,
|
||||
Tuple,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
from typing import Dict, List, Tuple, Type
|
||||
from collections.abc import Callable, Sequence
|
||||
|
||||
from pydantic import Field, InstanceOf, PrivateAttr, model_validator
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import Any, Optional, Union
|
||||
from typing import Dict, List
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
from collections.abc import Callable
|
||||
|
||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||
|
||||
@@ -8,13 +8,16 @@ from collections import defaultdict
|
||||
from contextlib import contextmanager
|
||||
from typing import (
|
||||
Any,
|
||||
DefaultDict,
|
||||
Dict,
|
||||
List,
|
||||
Literal,
|
||||
Optional,
|
||||
Type,
|
||||
TypedDict,
|
||||
Union,
|
||||
cast,
|
||||
)
|
||||
from typing import DefaultDict, Dict, List, Type
|
||||
from datetime import datetime
|
||||
from dotenv import load_dotenv
|
||||
from litellm.types.utils import ChatCompletionDeltaToolCall
|
||||
|
||||
Reference in New Issue
Block a user