Local workspace for running de_typer.py, de_type2.py, and de_typer_boxunbox.py against static-python-perf inside the Docker image.
Current guardrails in de_typer_boxunbox.py intentionally skip or force-typed certain cases:
- Class members: body detyping does not rewrite
self.<field>declarations, reads, or writes. - Top-level body annassigns: module
AnnAssignbody detyping is forced typed. body_cast_all:Optional[...]and unions are skipped (no flow narrowing).nogo_types: annotations rooted at iterator/generator/protocol/callable types are never detyped.Iterator,Iterable,Generator,AsyncIterator,AsyncGenerator,Coroutine,Protocol,Callable
- Imported nominal cast targets are a known limitation:
- boundary
cast(Population, dyn)/cast(module.Type, dyn)can fail static typecheck (cast to unknown type).
- boundary
- Ambiguous method names across unrelated class hierarchies are no-go for unresolved attribute-call boundary rewrites.
- Pure function calls (
foo(...)) are still eligible for normal boundary rewriting.