mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-26 04:46:46 +08:00
A couple fixes to the io stubs. (#1811)
1. The 'name' argument to FileIO.init can be either a string or an integer: https://docs.python.org/2/library/io.html#io.FileIO 2. An mmap.mmap object can be used in most places that a bytearray can: https://docs.python.org/3.5/library/mmap.html
This commit is contained in:
@@ -89,7 +89,6 @@ if sys.version_info >= (3, 5):
|
||||
def __init__(self, sock: socket, debuglevel: int = ...,
|
||||
method: Optional[str] = ..., url: Optional[str] = ...) -> None: ...
|
||||
def read(self, amt: Optional[int] = ...) -> bytes: ...
|
||||
def readinto(self, b: bytearray) -> int: ...
|
||||
@overload
|
||||
def getheader(self, name: str) -> Optional[str]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user