pyflakes

Set pyflake AND mypy ignore same line

Set pyflake AND mypy ignore same line Question: I write a module for Salt. By the documentation it adds __salt__ object into builtins. So, pyflake warn me that __salt__ is undefined when I run prospector and mypy says the same, that __salt__ is undefined! I can ignore either for pyflake with # noqa: F821 or …

Total answers: 1

Excluding directory

Excluding directory Question: I am working on a django project and am trying to run pyflakes on an app in it. I need to exclude the “migrations” directory from pyflakes. For pep8 I can do pep8 –exclude=migrations app_name Is there any similar way for pyflakes? I couldn’t find any proper documentation for pyflakes. Asked By: …

Total answers: 2

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

How to ignore Pyflakes errors ‘imported but unused’ in ‘__init__.py’ files? Question: I split my tests across multiple Python files: tests ├── __init__.py ├── test_apples.py └── test_bananas.py.py I import the tests in the ‘__init__.py’ file: from test_apples import ApplesTest from test_bananas import BananasTest However running Pyflakes on the command-line: pyflakes . outputs the following errors: …

Total answers: 6

How do I get Pyflakes to ignore a statement?

How do I get Pyflakes to ignore a statement? Question: A lot of our modules start with: try: import json except ImportError: from django.utils import simplejson as json # Python 2.4 fallback. …and it’s the only Pyflakes warning in the entire file: foo/bar.py:14: redefinition of unused ‘json’ from line 12 How can I get Pyflakes …

Total answers: 9

Pylint, PyChecker or PyFlakes?

Pylint, PyChecker or PyFlakes? Question: I would like to get some feedback on these tools on: features; adaptability; ease of use and learning curve. Asked By: e-satis || Source Answers: Well, I am a bit curious, so I just tested the three myself right after asking the question 😉 Ok, this is not a very …

Total answers: 2

Emacs 23 hangs on python mode when typing string block """

Emacs 23 hangs on python mode when typing string block """ Question: My Emacs hangs (Ubuntu 9 + Emacs 23 + Pyflakes) when I type “”” quotes for string blocks. Anybody experienced the same problem? I think, it may not be an Emacs problem but some Python mode or Pyflakes which I use it for …

Total answers: 4