from __future__ import annotations

from pathlib import Path
import tomllib


def test_mypy_has_no_ignore_errors_quarantine_overrides() -> None:
    pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
    data = tomllib.loads(pyproject.read_text(encoding="utf-8"))
    overrides = data.get("tool", {}).get("mypy", {}).get("overrides", [])
    flagged = [ov for ov in overrides if isinstance(ov, dict) and ov.get("ignore_errors") is True]
    assert flagged == []
