Type stubs for chardet - Universal encoding detector for Python
Overall
score
65%
A small tool that turns a third-party stub package directory into a publishable plan by reading its metadata, classifying dependencies, and persisting the result for release workflows.
1.2.3 and no explicit stub distribution name, the publish plan normalizes the version to an exact spec (e.g., ==1.2.3) and defaults the stub distribution to types-{distribution}. @test@generates
from pathlib import Path
from typing import TypedDict
class PublishPlan(TypedDict):
stub_distribution: str
version_spec: str
upload_enabled: bool
requires_python: str
typeshed_dependencies: list[str]
external_dependencies: list[str]
upstream_repository: str | None
partial_stub: bool
def build_publish_plan(distribution: str) -> PublishPlan:
"""
Construct a publish plan for stubs/<distribution> by reading its metadata and classifying dependencies.
"""
def write_publish_plan(distribution: str, output_path: str | Path) -> PublishPlan:
"""
Write the publish plan as JSON to output_path and return the computed plan.
"""Provides metadata parsing and dependency resolution for stub distributions to prepare PEP 561 uploads.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-types-chardetdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9