Skip to content

Commit 103056e

Browse files
fix some TODOs (#1994)
- Made deque.maxlen read-only - We don't support 3.2, so we don't care about signature changes in it - There don't seem to be any missing set operations (I compared the dir() of this class to that of builtins.set)
1 parent a62c6be commit 103056e

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

stdlib/2/__builtin__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,6 @@ class set(MutableSet[_T], Generic[_T]):
653653
def __lt__(self, s: AbstractSet[object]) -> bool: ...
654654
def __ge__(self, s: AbstractSet[object]) -> bool: ...
655655
def __gt__(self, s: AbstractSet[object]) -> bool: ...
656-
# TODO more set operations
657656

658657
class frozenset(AbstractSet[_T], Generic[_T]):
659658
@overload

stdlib/3/builtins.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ class bytearray(MutableSequence[int], ByteString):
503503
def __gt__(self, x: bytes) -> bool: ...
504504
def __ge__(self, x: bytes) -> bool: ...
505505

506-
507506
class memoryview(Sized, Container[bytes]):
508507
format = ... # type: str
509508
itemsize = ... # type: int
@@ -537,7 +536,6 @@ class memoryview(Sized, Container[bytes]):
537536
if sys.version_info >= (3, 5):
538537
def hex(self) -> str: ...
539538

540-
541539
class bool(int):
542540
def __init__(self, o: object = ...) -> None: ...
543541
@overload # type: ignore
@@ -720,7 +718,6 @@ class set(MutableSet[_T], Generic[_T]):
720718
def __lt__(self, s: AbstractSet[object]) -> bool: ...
721719
def __ge__(self, s: AbstractSet[object]) -> bool: ...
722720
def __gt__(self, s: AbstractSet[object]) -> bool: ...
723-
# TODO more set operations
724721

725722
class frozenset(AbstractSet[_T], Generic[_T]):
726723
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...
@@ -888,7 +885,6 @@ else:
888885
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...) -> IO[Any]: ...
889886

890887
def ord(c: Union[str, bytes, bytearray]) -> int: ...
891-
# TODO: in Python 3.2, print() does not support flush
892888
def print(*values: Any, sep: str = ..., end: str = ..., file: Optional[IO[str]] = ..., flush: bool = ...) -> None: ...
893889
@overload
894890
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y

stdlib/3/collections/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ class UserString(Sequence[str]):
187187
# methods did not exist).
188188
# But in practice it's not worth losing sleep over.
189189
class deque(MutableSequence[_T], Generic[_T]):
190-
maxlen = ... # type: Optional[int] # TODO readonly
190+
@property
191+
def maxlen(self) -> Optional[int]: ...
191192
def __init__(self, iterable: Iterable[_T] = ...,
192193
maxlen: int = ...) -> None: ...
193194
def append(self, x: _T) -> None: ...

0 commit comments

Comments
 (0)