File: cparser.pyi

package info (click to toggle)
python-clevercsv 0.8.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,080 kB
  • sloc: python: 6,211; ansic: 870; makefile: 90
file content (54 lines) | stat: -rw-r--r-- 1,504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# -*- coding: utf-8 -*-

from __future__ import annotations

from typing import Final
from typing import Generic
from typing import Iterable
from typing import List
from typing import Literal
from typing import Optional
from typing import Tuple
from typing import TypeVar
from typing import overload

_T = TypeVar("_T")

class Parser(Generic[_T]):
    _return_quoted: Final[bool]

    @overload
    def __init__(
        self: Parser[List[Tuple[str, bool]]],
        delimiter: Optional[str] = "",
        quotechar: Optional[str] = "",
        escapechar: Optional[str] = "",
        field_limit: Optional[int] = 128 * 1024,
        strict: Optional[bool] = False,
        return_quoted: Literal[True] = ...,
    ) -> None: ...
    @overload
    def __init__(
        self: Parser[List[str]],
        delimiter: Optional[str] = "",
        quotechar: Optional[str] = "",
        escapechar: Optional[str] = "",
        field_limit: Optional[int] = 128 * 1024,
        strict: Optional[bool] = False,
        return_quoted: Literal[False] = ...,
    ) -> None: ...
    @overload
    def __init__(
        self,
        data: Iterable[str],
        delimiter: Optional[str] = "",
        quotechar: Optional[str] = "",
        escapechar: Optional[str] = "",
        field_limit: Optional[int] = 128 * 1024,
        strict: Optional[bool] = False,
        return_quoted: bool = ...,
    ) -> None: ...
    def __iter__(self) -> "Parser": ...
    def __next__(self) -> _T: ...

class Error(Exception): ...