Type stubs for chardet - Universal encoding detector for Python
Agent Success
Agent success rate when using this tile
65%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.97x
Baseline
Agent success rate without this tile
67%
Summarize external dependencies, stubtest system requirements, stdlib support ranges, and the pinned type checker requirement for a typeshed-style repository root containing requirements-tests.txt, stdlib/VERSIONS, and stubs/<distribution>/METADATA.toml files.
stubs/alpha/METADATA.toml listing requires = ["requests>=2.31"] and stubs/beta/METADATA.toml listing requires = ["urllib3==1.26.0"], calling external_requirements(root, ["alpha", "beta"]) returns ["requests>=2.31", "urllib3==1.26.0"] in lexical order. @test"linux", when stubs/alpha/METADATA.toml declares stubtest system dependencies ["libenchant-2"] under a stubtest settings section and stubs/beta declares none, system_requirements(root, ["alpha", "beta"], "linux") returns ["libenchant-2"]. @teststdlib/VERSIONS file containing entries asyncio: 3.8-3.12 and asyncio.tasks: 3.9-3.12, stdlib_support(root, ["asyncio.tasks", "asyncio.submodule"]) returns {"asyncio.tasks": ("3.9", "3.12"), "asyncio.submodule": ("3.8", "3.12")} where missing exact entries inherit the closest parent module range. @testrequirements-tests.txt pinning the type checker dependency as mypy==1.10.0 alongside other entries, pinned_typechecker(root) returns the exact string mypy==1.10.0. @test@generates
from pathlib import Path
from typing import Mapping, Sequence
def external_requirements(root: Path, distributions: Sequence[str] | None = None) -> list[str]:
"""Return sorted unique requirement specifiers for selected stub distributions within root/stubs; defaults to all present distributions."""
def system_requirements(root: Path, distributions: Sequence[str] | None = None, platform: str | None = None) -> list[str]:
"""Return sorted unique system requirements needed for stubtest for the given distributions and platform (defaults to the current platform)."""
def stdlib_support(root: Path, modules: Sequence[str]) -> Mapping[str, tuple[str, str]]:
"""Return (min_version, max_version) strings for each stdlib module, inheriting the nearest parent module's range when an exact entry is missing."""
def pinned_typechecker(root: Path) -> str:
"""Return the pinned requirement specifier for the type checker dependency defined in the repository's requirements-tests.txt file."""Use the package's built-in helpers for reading stub metadata, aggregating requirements, and interpreting stdlib version ranges instead of reimplementing parsing logic. @satisfied-by
tessl i tessl/pypi-types-chardet@4.0.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9