Skip to content
Advertisement

How to ignore Pyflakes errors ‘imported but unused’ in ‘__init__.py’ files?

I split my tests across multiple Python files:

JavaScript

I import the tests in the ‘__init__.py’ file:

JavaScript

However running Pyflakes on the command-line:

JavaScript

outputs the following errors:

JavaScript

Advertisement

Answer

Add # pyflakes.ignore comment on every line you want to ignore (in your case import statements).

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement