csv: add a return type for things that return (#3604)

Technically, these return whatever the write object of the underlying
file object return. I'm not sure it's worth making everything generic
over this probably rarely used return type, but happy to do it (or drop
this change) if that seems better.
This commit is contained in:
Shantanu
2020-01-10 14:14:44 -08:00
committed by Jelle Zijlstra
parent 3b3fc6a57f
commit 055a907e75
2 changed files with 7 additions and 4 deletions

View File

@@ -96,8 +96,11 @@ class DictWriter(object):
*args: Any,
**kwds: Any,
) -> None: ...
def writeheader(self) -> None: ...
def writerow(self, rowdict: _DictRow) -> None: ...
if sys.version_info >= (3, 8):
def writeheader(self) -> Any: ...
else:
def writeheader(self) -> None: ...
def writerow(self, rowdict: _DictRow) -> Any: ...
def writerows(self, rowdicts: Iterable[_DictRow]) -> None: ...
class Sniffer(object):