mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-25 08:45:09 +00:00
fix(typing): drop unused type-ignores now that json-repair ships stubs
json-repair >= 0.60 is py.typed, so the import-untyped ignores fail CI with unused-ignore. Also read pyproject with explicit UTF-8 in the pin test (review feedback). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ AgentAction or AgentFinish objects.
|
||||
from dataclasses import dataclass
|
||||
import json
|
||||
|
||||
from json_repair import repair_json # type: ignore[import-untyped]
|
||||
from json_repair import repair_json
|
||||
from pydantic import BaseModel
|
||||
|
||||
from crewai.agents.constants import (
|
||||
|
||||
@@ -11,7 +11,7 @@ from typing import TYPE_CHECKING, Any, Literal
|
||||
|
||||
from crewai_core.printer import PRINTER
|
||||
import json5
|
||||
from json_repair import repair_json # type: ignore[import-untyped]
|
||||
from json_repair import repair_json
|
||||
|
||||
from crewai.events.event_bus import crewai_event_bus
|
||||
from crewai.events.types.tool_usage_events import (
|
||||
|
||||
@@ -17,7 +17,7 @@ PYPROJECT_PATH = Path(__file__).parents[2] / "pyproject.toml"
|
||||
|
||||
|
||||
def _get_requirement(name: str) -> Requirement:
|
||||
data = tomllib.loads(PYPROJECT_PATH.read_text())
|
||||
data = tomllib.loads(PYPROJECT_PATH.read_text(encoding="utf-8"))
|
||||
for spec in data["project"]["dependencies"]:
|
||||
requirement = Requirement(spec)
|
||||
if requirement.name == name:
|
||||
|
||||
Reference in New Issue
Block a user