from collections import abc
from typing import Any, Optional

from pandas.io.parsers.base_parser import ParserBase


class PythonParser(ParserBase):
    data: Any = ...
    buf: Any = ...
    pos: int = ...
    line_pos: int = ...
    encoding: Any = ...
    compression: Any = ...
    memory_map: Any = ...
    skiprows: Any = ...
    skipfunc: Any = ...
    skipfooter: Any = ...
    delimiter: Any = ...
    quotechar: Any = ...
    escapechar: Any = ...
    doublequote: Any = ...
    skipinitialspace: Any = ...
    lineterminator: Any = ...
    quoting: Any = ...
    skip_blank_lines: Any = ...
    warn_bad_lines: Any = ...
    error_bad_lines: Any = ...
    names_passed: Any = ...
    has_index_names: bool = ...
    verbose: Any = ...
    converters: Any = ...
    dtype: Any = ...
    thousands: Any = ...
    decimal: Any = ...
    comment: Any = ...
    num_original_columns: Any = ...
    columns: Any = ...
    orig_names: Any = ...
    index_names: Any = ...
    nonnum: Any = ...
    def __init__(self, f: Any, **kwds: Any) -> None: ...
    def read(self, rows: Optional[Any] = ...) -> Any: ...
    def get_chunk(self, size: Optional[Any] = ...) -> Any: ...

class FixedWidthReader(abc.Iterator[Any]):
    f: Any = ...
    buffer: Any = ...
    delimiter: Any = ...
    comment: Any = ...
    colspecs: Any = ...
    def __init__(self, f: Any, colspecs: Any, delimiter: Any, comment: Any, skiprows: Optional[Any] = ..., infer_nrows: int = ...) -> None: ...
    def get_rows(self, infer_nrows: Any, skiprows: Optional[Any] = ...) -> Any: ...
    def detect_colspecs(self, infer_nrows: int = ..., skiprows: Optional[Any] = ...) -> Any: ...
    def __next__(self) -> Any: ...

class FixedWidthFieldParser(PythonParser):
    colspecs: Any = ...
    infer_nrows: Any = ...
    def __init__(self, f: Any, **kwds: Any) -> None: ...

def count_empty_vals(vals: Any) -> Any: ...