What does '# noqa' mean in Python comments?

noqa = NO-QA (NO Quality Assurance)

It's generally used in Python code to ignore PEP8 warnings.

Lines with #noqa at the end will be ignored by linter programs and won't raise any warnings.


Adding # noqa to a line indicates that the linter (a program that automatically checks code quality) should not check this line. Any warnings that code may have generated will be ignored.

That line may have something that "looks bad" to the linter, but the developer understands and intends it to be there for some reason.

For more information, see the Flake8 documentation for Selecting and Ignoring Violations.