How can mypy ignore a single line in a source file?

You can ignore type errors with # type: ignore as of version 0.2 (see issue #500, Ignore specific lines):

PEP 484 uses # type: ignore for ignoring type errors on particular lines

Also, using # type: ignore close to the top of a file [skips] checking that file altogether.

Source: mypy#500. See also the mypy documentation.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)