From bed8a60990378f82c8edb43cd19f523d480ac218 Mon Sep 17 00:00:00 2001 From: claws Date: Tue, 30 Aug 2016 02:09:35 +0930 Subject: [PATCH] add hex to bytes, bytearray, memoryview (#507) --- stdlib/3/builtins.pyi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index e398b5403..774b90808 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -280,6 +280,8 @@ class bytes(ByteString): def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ... def expandtabs(self, tabsize: int = 8) -> bytes: ... def find(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... + if sys.version_info >= (3, 5): + def hex(self) -> str: ... def index(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... @@ -352,6 +354,8 @@ class bytearray(MutableSequence[int], ByteString): def endswith(self, suffix: bytes) -> bool: ... def expandtabs(self, tabsize: int = 8) -> bytearray: ... def find(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... + if sys.version_info >= (3, 5): + def hex(self) -> str: ... def index(self, sub: bytes, start: int = 0, end: int = 0) -> int: ... def insert(self, index: int, object: int) -> None: ... def isalnum(self) -> bool: ... @@ -419,6 +423,8 @@ class bytearray(MutableSequence[int], ByteString): class memoryview(): # TODO arg can be any obj supporting the buffer protocol def __init__(self, b: bytearray) -> None: ... + if sys.version_info >= (3, 5): + def hex(self) -> str: ... class bool(int, SupportsInt, SupportsFloat): def __init__(self, o: object = ...) -> None: ...