mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-28 04:22:21 +08:00
Fixing flake8 E121, E122, E123, E124, E125, E126 errors
This commit is contained in:
4
third_party/2/sqlalchemy/__init__.pyi
vendored
4
third_party/2/sqlalchemy/__init__.pyi
vendored
@@ -43,7 +43,7 @@ from .sql import (
|
||||
union,
|
||||
union_all,
|
||||
update,
|
||||
)
|
||||
)
|
||||
|
||||
from .types import (
|
||||
BIGINT,
|
||||
@@ -87,7 +87,7 @@ from .types import (
|
||||
UnicodeText,
|
||||
VARBINARY,
|
||||
VARCHAR,
|
||||
)
|
||||
)
|
||||
|
||||
from .schema import (
|
||||
CheckConstraint,
|
||||
|
||||
@@ -208,8 +208,8 @@ class LONGBLOB(object,
|
||||
class _EnumeratedValues(_StringType): ...
|
||||
|
||||
class ENUM( # sqltypes.Enum,
|
||||
_EnumeratedValues
|
||||
):
|
||||
_EnumeratedValues
|
||||
):
|
||||
__visit_name__ = ... # type: Any
|
||||
strict = ... # type: Any
|
||||
def __init__(self, *enums, **kw) -> None: ...
|
||||
|
||||
30
third_party/2and3/ujson.pyi
vendored
30
third_party/2and3/ujson.pyi
vendored
@@ -4,25 +4,28 @@ from typing import Any, AnyStr, IO, Optional
|
||||
|
||||
__version__ = ... # type: str
|
||||
|
||||
def encode(obj: Any,
|
||||
def encode(
|
||||
obj: Any,
|
||||
ensure_ascii: bool = ...,
|
||||
double_precision: bool = ...,
|
||||
encode_html_chars: bool = ...,
|
||||
escape_forward_slashes: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
indent: int = ...,
|
||||
) -> str: ...
|
||||
) -> str: ...
|
||||
|
||||
def dumps(obj: Any,
|
||||
def dumps(
|
||||
obj: Any,
|
||||
ensure_ascii: bool = ...,
|
||||
double_precision: bool = ...,
|
||||
encode_html_chars: bool = ...,
|
||||
escape_forward_slashes: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
indent: int = ...,
|
||||
) -> str: ...
|
||||
) -> str: ...
|
||||
|
||||
def dump(obj: Any,
|
||||
def dump(
|
||||
obj: Any,
|
||||
fp: IO[str],
|
||||
ensure_ascii: bool = ...,
|
||||
double_precision: bool = ...,
|
||||
@@ -30,16 +33,19 @@ def dump(obj: Any,
|
||||
escape_forward_slashes: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
indent: int = ...,
|
||||
) -> None: ...
|
||||
) -> None: ...
|
||||
|
||||
def decode(s: AnyStr,
|
||||
def decode(
|
||||
s: AnyStr,
|
||||
precise_float: bool = ...,
|
||||
) -> Any: ...
|
||||
) -> Any: ...
|
||||
|
||||
def loads(s: AnyStr,
|
||||
def loads(
|
||||
s: AnyStr,
|
||||
precise_float: bool = ...,
|
||||
) -> Any: ...
|
||||
) -> Any: ...
|
||||
|
||||
def load(fp: IO[AnyStr],
|
||||
def load(
|
||||
fp: IO[AnyStr],
|
||||
precise_float: bool = ...,
|
||||
) -> Any: ...
|
||||
) -> Any: ...
|
||||
|
||||
18
third_party/3.6/click/__init__.pyi
vendored
18
third_party/3.6/click/__init__.pyi
vendored
@@ -16,33 +16,33 @@
|
||||
|
||||
# Core classes
|
||||
from .core import Context, BaseCommand, Command, MultiCommand, Group, \
|
||||
CommandCollection, Parameter, Option, Argument
|
||||
CommandCollection, Parameter, Option, Argument
|
||||
|
||||
# Globals
|
||||
from .globals import get_current_context
|
||||
|
||||
# Decorators
|
||||
from .decorators import pass_context, pass_obj, make_pass_decorator, \
|
||||
command, group, argument, option, confirmation_option, \
|
||||
password_option, version_option, help_option
|
||||
command, group, argument, option, confirmation_option, \
|
||||
password_option, version_option, help_option
|
||||
|
||||
# Types
|
||||
from .types import ParamType, File, Path, Choice, IntRange, Tuple, \
|
||||
STRING, INT, FLOAT, BOOL, UUID, UNPROCESSED
|
||||
STRING, INT, FLOAT, BOOL, UUID, UNPROCESSED
|
||||
|
||||
# Utilities
|
||||
from .utils import echo, get_binary_stream, get_text_stream, open_file, \
|
||||
format_filename, get_app_dir, get_os_args
|
||||
format_filename, get_app_dir, get_os_args
|
||||
|
||||
# Terminal functions
|
||||
from .termui import prompt, confirm, get_terminal_size, echo_via_pager, \
|
||||
progressbar, clear, style, unstyle, secho, edit, launch, getchar, \
|
||||
pause
|
||||
progressbar, clear, style, unstyle, secho, edit, launch, getchar, \
|
||||
pause
|
||||
|
||||
# Exceptions
|
||||
from .exceptions import ClickException, UsageError, BadParameter, \
|
||||
FileError, Abort, NoSuchOption, BadOptionUsage, BadArgumentUsage, \
|
||||
MissingParameter
|
||||
FileError, Abort, NoSuchOption, BadOptionUsage, BadArgumentUsage, \
|
||||
MissingParameter
|
||||
|
||||
# Formatting
|
||||
from .formatting import HelpFormatter, wrap_text
|
||||
|
||||
2
third_party/3/dateutil/parser.pyi
vendored
2
third_party/3/dateutil/parser.pyi
vendored
@@ -36,7 +36,7 @@ class parser(object):
|
||||
default: Optional[datetime],
|
||||
ignoretz: bool=...,
|
||||
tzinfos =...,
|
||||
) -> datetime: ...
|
||||
) -> datetime: ...
|
||||
|
||||
DEFAULTPARSER = ... # type: parser
|
||||
|
||||
|
||||
4
third_party/3/itsdangerous.pyi
vendored
4
third_party/3/itsdangerous.pyi
vendored
@@ -117,8 +117,8 @@ class Serializer:
|
||||
|
||||
class TimedSerializer(Serializer):
|
||||
default_signer = ... # type: Callable[..., TimestampSigner]
|
||||
def loads(self, s: can_become_bytes, salt: Optional[can_become_bytes]=None, max_age: Optional[int]=None, return_timestamp=False) -> Any: ...
|
||||
def loads_unsafe(self, s: can_become_bytes, salt: Optional[can_become_bytes]=None, max_age: Optional[int]=None) -> Tuple[bool, Any]: ...
|
||||
def loads(self, s: can_become_bytes, salt: Optional[can_become_bytes]=None, max_age: Optional[int]=None, return_timestamp=False) -> Any: ...
|
||||
def loads_unsafe(self, s: can_become_bytes, salt: Optional[can_become_bytes]=None, max_age: Optional[int]=None) -> Tuple[bool, Any]: ...
|
||||
|
||||
class JSONWebSignatureSerializer(Serializer):
|
||||
jws_algorithms = ... # type: MutableMapping[str, SigningAlgorithm]
|
||||
|
||||
35
third_party/3/pkg_resources.pyi
vendored
35
third_party/3/pkg_resources.pyi
vendored
@@ -50,13 +50,16 @@ class WorkingSet:
|
||||
|
||||
working_set = ... # type: WorkingSet
|
||||
|
||||
def require(*requirements: Union[str, Sequence[str]]) \
|
||||
-> Sequence[Distribution]: ...
|
||||
def require(
|
||||
*requirements: Union[str, Sequence[str]]
|
||||
) -> Sequence[Distribution]: ...
|
||||
def run_script(requires: str, script_name: str) -> None: ...
|
||||
def iter_entry_points(group: str, name: Optional[str] = ...) \
|
||||
-> Generator[EntryPoint, None, None]: ...
|
||||
def add_activation_listener(callback: Callable[[Distribution], None]) \
|
||||
-> None: ...
|
||||
def iter_entry_points(
|
||||
group: str, name: Optional[str] = ...
|
||||
) -> Generator[EntryPoint, None, None]: ...
|
||||
def add_activation_listener(
|
||||
callback: Callable[[Distribution], None]
|
||||
) -> None: ...
|
||||
|
||||
|
||||
class Environment:
|
||||
@@ -133,8 +136,9 @@ class EntryPoint:
|
||||
installer: Optional[_InstallerType] = ...) -> None: ...
|
||||
|
||||
|
||||
def find_distributions(path_item: str, only: bool = ...) \
|
||||
-> Generator[Distribution, None, None]: ...
|
||||
def find_distributions(
|
||||
path_item: str, only: bool = ...
|
||||
) -> Generator[Distribution, None, None]: ...
|
||||
def get_distribution(dist: Union[Requirement, str, Distribution]) -> Distribution: ...
|
||||
|
||||
class Distribution(IResourceProvider, IMetadataProvider):
|
||||
@@ -251,11 +255,11 @@ else:
|
||||
class _Importer(importlib.abc.InspectLoader): ...
|
||||
|
||||
def register_finder(importer_type: type,
|
||||
distribution_finder: _DistFinderType) -> None : ...
|
||||
def register_loader_type(loader_type: type,
|
||||
provider_factory: Callable[[types.ModuleType],
|
||||
IResourceProvider]) \
|
||||
-> None: ...
|
||||
distribution_finder: _DistFinderType) -> None: ...
|
||||
def register_loader_type(
|
||||
loader_type: type,
|
||||
provider_factory: Callable[[types.ModuleType], IResourceProvider]
|
||||
) -> None: ...
|
||||
def register_namespace_handler(importer_type: type,
|
||||
namespace_handler: _NSHandlerType) -> None: ...
|
||||
|
||||
@@ -287,8 +291,9 @@ class FileMetadata(EmptyProvider, IResourceProvider):
|
||||
|
||||
def parse_version(v: str) -> Tuple[str, ...]: ...
|
||||
def yield_lines(strs: _NestedStr) -> Generator[str, None, None]: ...
|
||||
def split_sections(strs: _NestedStr) \
|
||||
-> Generator[Tuple[Optional[str], str], None, None]: ...
|
||||
def split_sections(
|
||||
strs: _NestedStr
|
||||
) -> Generator[Tuple[Optional[str], str], None, None]: ...
|
||||
def safe_name(name: str) -> str: ...
|
||||
def safe_version(version: str) -> str: ...
|
||||
def safe_extra(extra: str) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user