mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
Fixing flake8 E401, E402 errors
This commit is contained in:
8
third_party/2/simplejson/__init__.pyi
vendored
8
third_party/2/simplejson/__init__.pyi
vendored
@@ -1,10 +1,10 @@
|
||||
from typing import Any, IO
|
||||
|
||||
from simplejson.scanner import JSONDecodeError
|
||||
from simplejson.decoder import JSONDecoder
|
||||
from simplejson.encoder import JSONEncoder, JSONEncoderForHTML
|
||||
|
||||
def dumps(obj: Any, *args: Any, **kwds: Any) -> str: ...
|
||||
def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ...
|
||||
def loads(s: str, **kwds: Any) -> Any: ...
|
||||
def load(fp: IO[str]) -> Any: ...
|
||||
|
||||
from simplejson.scanner import JSONDecodeError
|
||||
from simplejson.decoder import JSONDecoder
|
||||
from simplejson.encoder import JSONEncoder, JSONEncoderForHTML
|
||||
|
||||
13
third_party/2/six/__init__.pyi
vendored
13
third_party/2/six/__init__.pyi
vendored
@@ -2,14 +2,19 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import types
|
||||
from typing import (
|
||||
Any, AnyStr, Callable, Iterable, Mapping, Optional,
|
||||
Pattern, Tuple, TypeVar, Union, overload, ValuesView, KeysView, ItemsView
|
||||
)
|
||||
import typing
|
||||
|
||||
import unittest
|
||||
import types
|
||||
|
||||
# Exports
|
||||
from __builtin__ import unichr as unichr
|
||||
from StringIO import StringIO as StringIO, StringIO as BytesIO
|
||||
from functools import wraps as wraps
|
||||
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_K = TypeVar('_K')
|
||||
@@ -62,12 +67,10 @@ def viewitems(d: Mapping[_K, _V]) -> ItemsView[_K, _V]: ...
|
||||
|
||||
def b(s: str) -> binary_type: ...
|
||||
def u(s: str) -> text_type: ...
|
||||
from __builtin__ import unichr as unichr
|
||||
int2byte = chr
|
||||
def byte2int(bs: binary_type) -> int: ...
|
||||
def indexbytes(buf: binary_type, i: int) -> int: ...
|
||||
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
||||
from StringIO import StringIO as StringIO, StringIO as BytesIO
|
||||
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: str = ...) -> None: ...
|
||||
@overload
|
||||
@@ -82,8 +85,6 @@ def raise_from(value: BaseException, from_value: BaseException) -> None: ...
|
||||
|
||||
print_ = print
|
||||
|
||||
from functools import wraps as wraps
|
||||
|
||||
def with_metaclass(meta: type, *bases: type) -> type: ...
|
||||
def add_metaclass(metaclass: type) -> Callable[[_T], _T]: ...
|
||||
def python_2_unicode_compatible(klass: _T) -> _T: ...
|
||||
|
||||
6
third_party/2/sqlalchemy/sql/expression.pyi
vendored
6
third_party/2/sqlalchemy/sql/expression.pyi
vendored
@@ -7,9 +7,6 @@ from . import base
|
||||
from . import selectable
|
||||
from . import dml
|
||||
|
||||
func = functions.func # type: functions._FunctionGenerator
|
||||
modifier = functions.modifier # type: functions._FunctionGenerator
|
||||
|
||||
from .visitors import Visitable
|
||||
|
||||
from .elements import ClauseElement, ColumnElement,\
|
||||
@@ -28,6 +25,9 @@ from .selectable import Alias, Join, Select, Selectable, TableClause, \
|
||||
subquery, HasPrefixes, HasSuffixes, Exists, ScalarSelect, TextAsFrom
|
||||
from .dml import Insert, Update, Delete, UpdateBase, ValuesBase
|
||||
|
||||
func = functions.func # type: functions._FunctionGenerator
|
||||
modifier = functions.modifier # type: functions._FunctionGenerator
|
||||
|
||||
and_ = ... # type: Any
|
||||
or_ = ... # type: Any
|
||||
bindparam = ... # type: Any
|
||||
|
||||
4
third_party/2and3/jinja2/utils.pyi
vendored
4
third_party/2and3/jinja2/utils.pyi
vendored
@@ -4,6 +4,8 @@
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from markupsafe import Markup, escape, soft_unicode
|
||||
|
||||
missing = ... # type: Any
|
||||
internal_code = ... # type: Any
|
||||
concat = ... # type: Any
|
||||
@@ -60,5 +62,3 @@ class Joiner:
|
||||
used = ... # type: bool
|
||||
def __init__(self, sep: str = ...) -> None: ...
|
||||
def __call__(self): ...
|
||||
|
||||
from markupsafe import Markup, escape, soft_unicode
|
||||
|
||||
4
third_party/3.6/click/core.pyi
vendored
4
third_party/3.6/click/core.pyi
vendored
@@ -430,5 +430,5 @@ class Argument(Parameter):
|
||||
) -> None:
|
||||
...
|
||||
|
||||
|
||||
from click.types import ParamType # cyclic dependency
|
||||
# cyclic dependency
|
||||
from click.types import ParamType # noqa: E402
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
from typing import Any
|
||||
from . import packages
|
||||
from http.client import HTTPConnection as _HTTPConnection
|
||||
import ssl
|
||||
# from httplib import HTTPConnection as _HTTPConnection # python 2
|
||||
from . import exceptions
|
||||
from .packages import ssl_match_hostname
|
||||
@@ -12,7 +13,6 @@ import http.client
|
||||
|
||||
class DummyConnection: ...
|
||||
|
||||
import ssl
|
||||
BaseSSLError = ssl.SSLError
|
||||
ConnectionError = __builtins__.ConnectionError
|
||||
HTTPException = http.client.HTTPException
|
||||
|
||||
16
third_party/3/six/__init__.pyi
vendored
16
third_party/3/six/__init__.pyi
vendored
@@ -19,10 +19,14 @@ from typing import (
|
||||
ValuesView,
|
||||
overload,
|
||||
)
|
||||
import typing
|
||||
|
||||
import unittest
|
||||
import types
|
||||
import typing
|
||||
import unittest
|
||||
|
||||
# Exports
|
||||
from io import StringIO as StringIO, BytesIO as BytesIO
|
||||
from builtins import next as next
|
||||
from functools import wraps as wraps
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_K = TypeVar('_K')
|
||||
@@ -45,9 +49,6 @@ MAXSIZE = ... # type: int
|
||||
# def add_move
|
||||
# def remove_move
|
||||
|
||||
from builtins import next as advance_iterator
|
||||
next = advance_iterator
|
||||
|
||||
def callable(obj: object) -> bool: ...
|
||||
|
||||
def get_unbound_function(unbound: types.FunctionType) -> types.FunctionType: ...
|
||||
@@ -80,7 +81,6 @@ def int2byte(i: int) -> bytes: ...
|
||||
def byte2int(bs: binary_type) -> int: ...
|
||||
def indexbytes(buf: binary_type, i: int) -> int: ...
|
||||
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
||||
from io import StringIO as StringIO, BytesIO as BytesIO
|
||||
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: str = None) -> None: ...
|
||||
@overload
|
||||
@@ -96,8 +96,6 @@ def raise_from(value: BaseException, from_value: BaseException) -> None: ...
|
||||
|
||||
print_ = print
|
||||
|
||||
from functools import wraps as wraps
|
||||
|
||||
def with_metaclass(meta: type, *bases: type) -> type: ...
|
||||
def add_metaclass(metaclass: type) -> Callable[[_T], _T]: ...
|
||||
def python_2_unicode_compatible(klass: _T) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user