CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-types-chardet

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%

Overview
Eval results
Files

task.mdevals/scenario-6/

Requirement Matrix Builder

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.

Capabilities

External requirement snapshot

  • With a stub root containing 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

System dependency aggregation

  • On platform "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"]. @test

Stdlib version lookup

  • Using a stdlib/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. @test

Type checker pin exposure

  • With requirements-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

Implementation

@generates

API

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."""

Dependencies { .dependencies }

typeshed utilities { .dependency }

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.0

tile.json