Skip to content

Can't use csv.writer with --strict? #1277

@ns-cweber

Description

@ns-cweber

When I use mypy --strict with a csv.writer(text_io), I get the error Call to untyped function "writer" in typed context. I expected that since csv.writer is part of the standard library, it would be typed in typeshed, but either it's not typed or I'm misreading:

def writer(csvfile, dialect=..., **fmtparams): ...

Is it possible to work around this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions