Set pyflake AND mypy ignore same line

PEP 484 specifies towards the end of the section on type comments the following:

In some cases, linting tools or other comments may be needed on the same line as a type comment. In these cases, the type comment should be before other comments and linting markers:

# type: ignore # ~comment or other marker~

So, as Ryan Tam suggested, # type: ignore # noqa is the correct way to ignore both.

Leave a Comment