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:
Joao Moura
2026-07-13 21:06:54 -07:00
parent 69f63de100
commit aaccbe5d62
3 changed files with 3 additions and 3 deletions

View File

@@ -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 (

View File

@@ -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 (

View File

@@ -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: