module documentation
Parse a pyi file using typed_ast.
Class |
|
Converts typed_ast annotations to pytd. |
Class |
|
Converts typing.Annotated metadata. |
Class |
|
Pyi parsing options. |
Class |
|
Splice a list into a node body. |
Function | canonical |
Rewrite a pyi in canonical form. |
Function | parse |
Parse a pyi string. |
Function | parse |
Debug version of parse_pyi. |
Function | parse |
Undocumented |
Function | post |
Post-process the parsed AST. |
Class | _ |
Converts a typed_ast tree to a pytd tree. |
Class | _ |
Internal representation of ParamSpec. |
Class | _ |
Internal representation of TypeVar. |
Class | _ |
Internal representation of type variables. |
Function | _attribute |
Recursively convert Attributes to Names. |
Function | _feature |
Get the python feature version for the parser. |
Function | _flatten |
Flatten a list with nested Splices. |
Function | _import |
Convert a typedast import's 'from' into one that add_import expects. |
Function | _parse |
Call the typed_ast parser with the appropriate feature version. |
Function | _tuple |
Convert a typedast import into one that add_import expects. |
Constant | _ANNOTATED |
Undocumented |
Constant | _COLL |
Undocumented |
Constant | _FINAL |
Undocumented |
Constant | _NEWTYPE |
Undocumented |
Constant | _PARAMSPEC |
Undocumented |
Constant | _TOPLEVEL |
Undocumented |
Constant | _TYPE |
Undocumented |
Constant | _TYPEDDICT |
Undocumented |
Constant | _TYPEVAR |
Undocumented |
Constant | _TYPING |
Undocumented |
Constant | _TYPING |
Undocumented |
def parse_pyi(src:
str
, filename: Optional[ str]
, module_name: str
, options: Optional[ PyiOptions]
= None) -> pytd.TypeDeclUnit
:
(source)
¶
Parse a pyi string.
def parse_pyi_debug(src:
str
, filename: str
, module_name: str
, options: Optional[ PyiOptions]
= None) -> Tuple[ pytd.TypeDeclUnit, _GeneratePytdVisitor]
:
(source)
¶
Debug version of parse_pyi.
def parse_string(src:
str
, name: Optional[ str]
= None, filename: Optional[ str]
= None, options: Optional[ PyiOptions]
= None):
(source)
¶
Undocumented