Debian Codegraph @

clevercsv/cparser.pyi

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2
3 from __future__ import annotations
4
5 from typing import Final
6 from typing import Generic
7 from typing import Iterable
8 from typing import List
9 from typing import Literal
10 from typing import Optional
11 from typing import Tuple
12 from typing import TypeVar
13 from typing import overload
14
15 _T = TypeVar("_T")
16
17 class Parser(Generic[_T]):
18 _return_quoted: Final[bool]
19
20 @overload
21 def __init__(
22 self: Parser[List[Tuple[str, bool]]],
23 delimiter: Optional[str] = "",
24 quotechar: Optional[str] = "",
25 escapechar: Optional[str] = "",
26 field_limit: Optional[int] = 128 * 1024,
27 strict: Optional[bool] = False,
28 return_quoted: Literal[True] = ...,
29 ) -> None: ...
30 @overload
31 def __init__(
32 self: Parser[List[str]],
33 delimiter: Optional[str] = "",
34 quotechar: Optional[str] = "",
35 escapechar: Optional[str] = "",
36 field_limit: Optional[int] = 128 * 1024,
37 strict: Optional[bool] = False,
38 return_quoted: Literal[False] = ...,
39 ) -> None: ...
40 @overload
41 def __init__(
42 self,
43 data: Iterable[str],
44 delimiter: Optional[str] = "",
45 quotechar: Optional[str] = "",
46 escapechar: Optional[str] = "",
47 field_limit: Optional[int] = 128 * 1024,
48 strict: Optional[bool] = False,
49 return_quoted: bool = ...,
50 ) -> None: ...
51 def __iter__(self) -> "Parser": ...
52 def __next__(self) -> _T: ...
53
54 class Error(Exception): ...