mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
ast: some fixes for py38 (#3625)
* ast: make parse args keyword-only * ast: get_source_segment is py38 on
This commit is contained in:
committed by
Sebastian Rittau
parent
32959dfe6e
commit
ba8b2585c6
@@ -31,6 +31,7 @@ if sys.version_info >= (3, 8):
|
||||
source: Union[str, bytes],
|
||||
filename: Union[str, bytes] = ...,
|
||||
mode: Literal["exec"] = ...,
|
||||
*,
|
||||
type_comments: bool = ...,
|
||||
feature_version: Union[None, int, _typing.Tuple[int, int]] = ...,
|
||||
) -> Module: ...
|
||||
@@ -39,6 +40,7 @@ if sys.version_info >= (3, 8):
|
||||
source: Union[str, bytes],
|
||||
filename: Union[str, bytes] = ...,
|
||||
mode: str = ...,
|
||||
*,
|
||||
type_comments: bool = ...,
|
||||
feature_version: Union[None, int, _typing.Tuple[int, int]] = ...,
|
||||
) -> AST: ...
|
||||
@@ -60,5 +62,6 @@ def increment_lineno(node: _T, n: int = ...) -> _T: ...
|
||||
def iter_child_nodes(node: AST) -> Iterator[AST]: ...
|
||||
def iter_fields(node: AST) -> Iterator[_typing.Tuple[str, Any]]: ...
|
||||
def literal_eval(node_or_string: Union[str, AST]) -> Any: ...
|
||||
def get_source_segment(source: str, node: AST, *, padded: bool = ...) -> Optional[str]: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def get_source_segment(source: str, node: AST, *, padded: bool = ...) -> Optional[str]: ...
|
||||
def walk(node: AST) -> Iterator[AST]: ...
|
||||
|
||||
Reference in New Issue
Block a user