Enable --disallow-any-generics for stubs (#3288)

This commit is contained in:
Sebastian Rittau
2019-10-01 14:31:34 +02:00
committed by Jelle Zijlstra
parent 23b353303b
commit c32e1e2280
77 changed files with 386 additions and 329 deletions

View File

@@ -3,7 +3,7 @@ from typing import Any, Callable, Hashable, Iterable, Iterator, MutableMapping,
_T = TypeVar('_T')
_Setlike = Union[BaseSet[_T], Iterable[_T]]
_SelfT = TypeVar('_SelfT', bound=BaseSet)
_SelfT = TypeVar('_SelfT')
class BaseSet(Iterable[_T]):
def __init__(self) -> None: ...
@@ -18,13 +18,13 @@ class BaseSet(Iterable[_T]):
def __copy__(self: _SelfT) -> _SelfT: ...
def __deepcopy__(self: _SelfT, memo: MutableMapping[int, BaseSet[_T]]) -> _SelfT: ...
def __or__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def union(self: _SelfT, other: _Setlike) -> _SelfT: ...
def union(self: _SelfT, other: _Setlike[_T]) -> _SelfT: ...
def __and__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def intersection(self: _SelfT, other: _Setlike) -> _SelfT: ...
def intersection(self: _SelfT, other: _Setlike[Any]) -> _SelfT: ...
def __xor__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def symmetric_difference(self: _SelfT, other: _Setlike) -> _SelfT: ...
def symmetric_difference(self: _SelfT, other: _Setlike[_T]) -> _SelfT: ...
def __sub__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def difference(self: _SelfT, other: _Setlike) -> _SelfT: ...
def difference(self: _SelfT, other: _Setlike[Any]) -> _SelfT: ...
def __contains__(self, element: Any) -> bool: ...
def issubset(self, other: BaseSet[_T]) -> bool: ...
def issuperset(self, other: BaseSet[_T]) -> bool: ...
@@ -34,20 +34,20 @@ class BaseSet(Iterable[_T]):
def __gt__(self, other: BaseSet[_T]) -> bool: ...
class ImmutableSet(BaseSet[_T], Hashable):
def __init__(self, iterable: Optional[_Setlike] = ...) -> None: ...
def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ...
def __hash__(self) -> int: ...
class Set(BaseSet[_T]):
def __init__(self, iterable: Optional[_Setlike] = ...) -> None: ...
def __ior__(self, other: BaseSet[_T]) -> Set: ...
def union_update(self, other: _Setlike) -> None: ...
def __iand__(self, other: BaseSet[_T]) -> Set: ...
def intersection_update(self, other: _Setlike) -> None: ...
def __ixor__(self, other: BaseSet[_T]) -> Set: ...
def symmetric_difference_update(self, other: _Setlike) -> None: ...
def __isub__(self, other: BaseSet[_T]) -> Set: ...
def difference_update(self, other: _Setlike) -> None: ...
def update(self, iterable: _Setlike) -> None: ...
def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ...
def __ior__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def union_update(self, other: _Setlike[_T]) -> None: ...
def __iand__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def intersection_update(self, other: _Setlike[Any]) -> None: ...
def __ixor__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def symmetric_difference_update(self, other: _Setlike[_T]) -> None: ...
def __isub__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def difference_update(self, other: _Setlike[Any]) -> None: ...
def update(self, iterable: _Setlike[_T]) -> None: ...
def clear(self) -> None: ...
def add(self, element: _T) -> None: ...
def remove(self, element: _T) -> None: ...