mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 17:43:25 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
import sys
|
||||
import typing as _typing
|
||||
from typing import Any, Iterator, Optional, TypeVar, Union, overload
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
from _ast import * # type: ignore
|
||||
@@ -19,6 +20,7 @@ if sys.version_info >= (3, 8):
|
||||
class Bytes(Constant): ...
|
||||
class NameConstant(Constant): ...
|
||||
class Ellipsis(Constant): ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
class slice(AST): ...
|
||||
class ExtSlice(slice): ...
|
||||
@@ -180,16 +182,23 @@ if sys.version_info >= (3, 9):
|
||||
def unparse(ast_obj: AST) -> str: ...
|
||||
|
||||
def copy_location(new_node: _T, old_node: AST) -> _T: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ..., *, indent: Union[int, str, None] = ...) -> str: ...
|
||||
def dump(
|
||||
node: AST, annotate_fields: bool = ..., include_attributes: bool = ..., *, indent: Union[int, str, None] = ...
|
||||
) -> str: ...
|
||||
|
||||
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: ...
|
||||
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: ...
|
||||
|
||||
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