The Ignore Errors docs currently indicate a way to ignore a specific error for a particular line:
example = lambda: 'example' # noqa: E731
... and a way to ignore all errors for the whole file:
from foo import unused
function_that_doesnt_exist()
x = 1+ 2
... and in several ways, either through configuration or through command-line options, globally disable a specific error in the entire project.
But what if I want to ignore a specific error in an entire separate file - for example, turn off warnings about unused imports in a __init__.pyfile __init__.pythat simply imports several classes so that code from other packages can import them from this in turn? The docs don't seem to hint at any syntax for this. Is it possible?
source
share