mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-09 11:11:26 +08:00
ConfigParser: accept readline() that takes no arguments (#4433)
At runtime readline() is called without arguments, so requiring an optional argument may result in false positives.
This commit is contained in:
@@ -151,6 +151,9 @@ class SupportsRead(Protocol[_T_co]):
|
||||
class SupportsReadline(Protocol[_T_co]):
|
||||
def readline(self, __length: int = ...) -> _T_co: ...
|
||||
|
||||
class SupportsNoArgReadline(Protocol[_T_co]):
|
||||
def readline(self) -> _T_co: ...
|
||||
|
||||
class SupportsWrite(Protocol[_T_contra]):
|
||||
def write(self, __s: _T_contra) -> int: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user