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:
Jukka Lehtosalo authored and GitHub committed 2020-08-10 15:55:32 +01:00
1 parent 0cd2350595
commit 866b0c3bf0
2 files changed
+5 -2

No files matched your search

+3
View File
@@ -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: ...