--- /dev/null
+import sys\r
+\r
+from typing import Any, Iterable, Iterator, List, Optional, Sequence\r
+\r
+QUOTE_ALL = ... # type: int\r
+QUOTE_MINIMAL = ... # type: int\r
+QUOTE_NONE = ... # type: int\r
+QUOTE_NONNUMERIC = ... # type: int\r
+\r
+class Error(Exception): ...\r
+\r
+class Dialect:\r
+ delimiter = ... # type: str\r
+ quotechar = ... # type: Optional[str]\r
+ escapechar = ... # type: Optional[str]\r
+ doublequote = ... # type: bool\r
+ skipinitialspace = ... # type: bool\r
+ lineterminator = ... # type: str\r
+ quoting = ... # type: int\r
+ strict = ... # type: int\r
+ def __init__(self) -> None: ...\r
+\r
+class _reader(Iterator[List[str]]):\r
+ dialect = ... # type: Dialect\r
+ line_num = ... # type: int\r
+ if sys.version_info >= (3, 0):\r
+ def __next__(self) -> List[str]: ...\r
+ else:\r
+ def next(self) -> List[str]: ...\r
+\r
+class _writer:\r
+ dialect = ... # type: Dialect\r
+\r
+ if sys.version_info >= (3, 5):\r
+ def writerow(self, row: Iterable[Any]) -> None: ...\r
+ def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ...\r
+ else:\r
+ def writerow(self, row: Sequence[Any]) -> None: ...\r
+ def writerows(self, rows: Iterable[Sequence[Any]]) -> None: ...\r
+\r
+\r
+# TODO: precise type\r
+def writer(csvfile: Any, dialect: Any = ..., **fmtparams: Any) -> _writer: ...\r
+def reader(csvfile: Iterable[str], dialect: Any = ..., **fmtparams: Any) -> _reader: ...\r
+def register_dialect(name: str, dialect: Any = ..., **fmtparams: Any) -> None: ...\r
+def unregister_dialect(name: str) -> None: ...\r
+def get_dialect(name: str) -> Dialect: ...\r
+def list_dialects() -> List[str]: ...\r
+def field_size_limit(new_limit: int = ...) -> int: ...\r