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%
Design a small scheduling utility that loads job definitions from a JSON file, validates them, and computes the next few run times. The implementation must rely on precise Python standard-library typing so static analyzers can verify correct usage of filesystem paths, date/time objects, immutable collections, and iterable inputs.
name, a string list command, an ISO-8601 start_at timestamp with offset info, an integer interval_minutes, and an optional string list tags @testname, command, start_at, interval_minutes) by raising a ValueError @test@generates
from dataclasses import dataclass
from datetime import datetime, timedelta
from pathlib import Path
from typing import Iterable, Sequence
@dataclass(frozen=True)
class JobDefinition:
name: str
command: Sequence[str]
start_at: datetime
interval: timedelta
tags: frozenset[str] | None = None
@dataclass(frozen=True)
class RunPlan:
job: JobDefinition
run_at: datetime
def load_jobs(path: Path) -> list[JobDefinition]:
...
def next_runs(
jobs: Iterable[JobDefinition],
now: datetime,
limit: int = 5,
tag: str | None = None,
) -> list[RunPlan]:
...Provides standard library type stubs so type checkers can validate usage of filesystem, datetime, and typing constructs.
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