ast.get_docstring does not work with arbitrary AST nodes (#9407)

This commit is contained in:
Nikita Sobolev
2022-12-24 21:43:44 +03:00
committed by GitHub
parent 0c196791fc
commit 0e4c59a076

View File

@@ -261,7 +261,7 @@ else:
def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ...
def fix_missing_locations(node: _T) -> _T: ...
def get_docstring(node: AST, clean: bool = ...) -> str | None: ...
def get_docstring(node: AsyncFunctionDef | FunctionDef | ClassDef | Module, clean: bool = ...) -> str | None: ...
def increment_lineno(node: _T, n: int = ...) -> _T: ...
def iter_child_nodes(node: AST) -> Iterator[AST]: ...
def iter_fields(node: AST) -> Iterator[tuple[str, Any]]: ...