# Stubs for csv (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Undefined, Any

QUOTE_ALL = Undefined(int)
QUOTE_MINIMAL = Undefined(int)
QUOTE_NONE = Undefined(int)
QUOTE_NONNUMERIC = Undefined(int)

class Error(Exception): pass

def writer(csvfile, dialect=Undefined, **fmtparams): pass
def reader(csvfile, dialect=Undefined, **fmtparams): pass
def register_dialect(name, dialect=Undefined, **fmtparams): pass
def unregister_dialect(name): pass
def get_dialect(name): pass
def list_dialects(): pass
def field_size_limit(new_limit=Undefined): pass

class Dialect:
    delimiter = Undefined(Any)
    quotechar = Undefined(Any)
    escapechar = Undefined(Any)
    doublequote = Undefined(Any)
    skipinitialspace = Undefined(Any)
    lineterminator = Undefined(Any)
    quoting = Undefined(Any)
    def __init__(self): pass

class excel(Dialect):
    delimiter = Undefined(Any)
    quotechar = Undefined(Any)
    doublequote = Undefined(Any)
    skipinitialspace = Undefined(Any)
    lineterminator = Undefined(Any)
    quoting = Undefined(Any)

class excel_tab(excel):
    delimiter = Undefined(Any)

class unix_dialect(Dialect):
    delimiter = Undefined(Any)
    quotechar = Undefined(Any)
    doublequote = Undefined(Any)
    skipinitialspace = Undefined(Any)
    lineterminator = Undefined(Any)
    quoting = Undefined(Any)

class DictReader:
    restkey = Undefined(Any)
    restval = Undefined(Any)
    reader = Undefined(Any)
    dialect = Undefined(Any)
    line_num = Undefined(Any)
    fieldnames = Undefined(Any) # Actually a property
    def __init__(self, f, fieldnames=None, restkey=None, restval=None, dialect='',
                 *args, **kwds): pass
    def __iter__(self): pass
    def __next__(self): pass

class DictWriter:
    fieldnames = Undefined(Any)
    restval = Undefined(Any)
    extrasaction = Undefined(Any)
    writer = Undefined(Any)
    def __init__(self, f, fieldnames, restval='', extrasaction='', dialect='', *args, **kwds): pass
    def writeheader(self): pass
    def writerow(self, rowdict): pass
    def writerows(self, rowdicts): pass

class Sniffer:
    preferred = Undefined(Any)
    def __init__(self): pass
    def sniff(self, sample, delimiters=None): pass
    def has_header(self, sample): pass
