Public API referenceΒΆ
All names exported from the top-level stubpy package form the stable
public interface. Everything else is internal and may change between minor
versions.
Core entry points
Generate a |
|
Generate |
|
Outcome of a |
See stubpy.generator for full documentation.
Configuration
Per-run configuration options for stub generation. |
|
Mutable state container scoped to one stub-generation run. |
|
Controls whether the target module is executed during stub generation. |
|
A pairing of a live annotation object with its stub alias string. |
|
Load a |
|
Walk upward from search_dir looking for a stubpy config file. |
See stubpy.context and stubpy.config for full documentation.
Diagnostics
Mutable accumulator for |
|
An immutable record of a single issue detected during stub generation. |
|
Severity of a single diagnostic message. |
|
Pipeline stage that produced a diagnostic. |
See stubpy.diagnostics for full documentation.
Stub emitters
Generate the full |
|
Generate the |
|
Generate a |
|
Re-emit a TypeVar, TypeAlias, NewType, ParamSpec, or TypeVarTuple declaration. |
|
Emit one |
See stubpy.emitter for full documentation.
Annotation handling
Convert any annotation object to a valid |
|
Format a single |
|
Register a custom annotation-to-string handler. |
See stubpy.annotations for full documentation.
Docstring type inference
Parse type information from a structured docstring. |
|
Result of parsing one docstring for type information. |
See stubpy.docstring for full documentation.
Incremental stub merge
Merge generated stub content into existing |
|
Wrap content between canonical begin/end markers. |
|
Read output_path (if it exists) and merge generated into it. |
See stubpy.stub_merge for full documentation.