mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 19:11:26 +08:00
Introduce _typeshed.SupportsFlush (#10983)
This commit is contained in:
1 parent
6c5d1d3ae8
commit
a5c1a4cd3f
2 files changed
+6
-2
No files matched your search
@@ -236,6 +236,10 @@ class SupportsNoArgReadline(Protocol[_T_co]):
|
||||
class SupportsWrite(Protocol[_T_contra]):
|
||||
def write(self, __s: _T_contra) -> object: ...
|
||||
|
||||
# stable
|
||||
class SupportsFlush(Protocol):
|
||||
def flush(self) -> object: ...
|
||||
|
||||
# Unfortunately PEP 688 does not allow us to distinguish read-only
|
||||
# from writable buffers. We use these aliases for readability for now.
|
||||
# Perhaps a future extension of the buffer protocol will allow us to
|
||||
|
||||
Reference in new issue
Block a user