2 Commits

Author SHA1 Message Date
Dave Halter d386452478 Make builtins work
One change is a Jedi issue, Jedi cannot really deal with __new__.
The other is a typeshed issue. "function" should not be defined in the stubs.
2019-12-14 11:30:20 +01:00
Dave Halter 772f7a48e6 Make sure that the context manager for sqlite3.Connection works (#3542) 2019-12-14 10:08:37 +01:00
3 changed files with 3 additions and 19 deletions
+1 -9
View File
@@ -869,6 +869,7 @@ class slice(object):
class tuple(Sequence[_T_co], Generic[_T_co]):
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
def __init__(self, iterable: Iterable[_T_co] = ...): ...
def __len__(self) -> int: ...
def __contains__(self, x: object) -> bool: ...
@overload
@@ -892,15 +893,6 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
else:
def index(self, x: Any) -> int: ...
class function:
# TODO not defined in builtins!
__name__: str
__module__: str
__code__: CodeType
if sys.version_info >= (3,):
__qualname__: str
__annotations__: Dict[str, Any]
class list(MutableSequence[_T], Generic[_T]):
@overload
def __init__(self) -> None: ...
+1 -9
View File
@@ -869,6 +869,7 @@ class slice(object):
class tuple(Sequence[_T_co], Generic[_T_co]):
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
def __init__(self, iterable: Iterable[_T_co] = ...): ...
def __len__(self) -> int: ...
def __contains__(self, x: object) -> bool: ...
@overload
@@ -892,15 +893,6 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
else:
def index(self, x: Any) -> int: ...
class function:
# TODO not defined in builtins!
__name__: str
__module__: str
__code__: CodeType
if sys.version_info >= (3,):
__qualname__: str
__annotations__: Dict[str, Any]
class list(MutableSequence[_T], Generic[_T]):
@overload
def __init__(self) -> None: ...
+1 -1
View File
@@ -154,7 +154,7 @@ class Connection(object):
progress: Optional[Callable[[int, int, int], object]] = ..., name: str = ...,
sleep: float = ...) -> None: ...
def __call__(self, *args, **kwargs): ...
def __enter__(self, *args, **kwargs): ...
def __enter__(self, *args, **kwargs) -> Connection: ...
def __exit__(self, *args, **kwargs): ...
class Cursor(Iterator[Any]):