mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix the signature of IOBase._checkClosed(). (#3305)
* In Python 2, the optional `msg` argument was missing. * In Python 3, the method was missing altogether. Reference: https://github.com/python/cpython/blob/2.7/Lib/_pyio.py#L423 https://github.com/python/cpython/blob/3.6/Lib/_pyio.py#L443
This commit is contained in:
@@ -16,7 +16,7 @@ _T = TypeVar("_T")
|
||||
class _IOBase(BinaryIO):
|
||||
@property
|
||||
def closed(self) -> bool: ...
|
||||
def _checkClosed(self) -> None: ...
|
||||
def _checkClosed(self, msg: Optional[str] = ...) -> None: ... # undocumented
|
||||
def _checkReadable(self) -> None: ...
|
||||
def _checkSeekable(self) -> None: ...
|
||||
def _checkWritable(self) -> None: ...
|
||||
|
||||
@@ -45,6 +45,7 @@ class IOBase:
|
||||
def __del__(self) -> None: ...
|
||||
@property
|
||||
def closed(self) -> bool: ...
|
||||
def _checkClosed(self, msg: Optional[str] = ...) -> None: ... # undocumented
|
||||
|
||||
class RawIOBase(IOBase):
|
||||
def readall(self) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user