parley/spec.py (declarative recipes → the engine) is the largest core module still carrying bare container annotations. Hints only — zero behaviour change.
What is wanted
PartySpec.hard: list → List[Constraint]; PartySpec.utility: list → List[UtilityTerm]
DecisionSpec.options: list → List[dict]; DecisionSpec.parties: list → List[PartySpec]
UtilityTerm.score(...) -> tuple → Tuple[float, float]
to_agents() -> list → List[Agent]
run(...) currently has no return annotation → ConsensusResult (import alongside the existing run_consensus import from .consensus)
from_dict(cls, d: dict) params → Dict[str, Any] where the dict shape is JSON-ish
Match the style of the #32 pass (typing.List/Optional imports).
How to verify
.venv/bin/pytest -q tests/test_spec.py tests/test_real_decision_recipes.py
.venv/bin/pytest -q
Identical results as before — annotations only.
parley/spec.py(declarative recipes → the engine) is the largest core module still carrying bare container annotations. Hints only — zero behaviour change.What is wanted
PartySpec.hard: list→List[Constraint];PartySpec.utility: list→List[UtilityTerm]DecisionSpec.options: list→List[dict];DecisionSpec.parties: list→List[PartySpec]UtilityTerm.score(...) -> tuple→Tuple[float, float]to_agents() -> list→List[Agent]run(...)currently has no return annotation →ConsensusResult(import alongside the existingrun_consensusimport from.consensus)from_dict(cls, d: dict)params →Dict[str, Any]where the dict shape is JSON-ishMatch the style of the #32 pass (
typing.List/Optionalimports).How to verify
Identical results as before — annotations only.