Login

Tag "pyflakes"

Snippet List

invoke pyflakes via manage.py

Invokes [pyflakes](http://divmod.org/trac/wiki/DivmodPyflakes) diagnostic tool as a `manage.py` command. Save as `flakes.py`, since `pyflakes.py` will collide with `pyflakes` module. I needed to invoke pyflakes as management command, because I alter `sys.path` in my `manage.py`, so system-wide pyflakes would not see project-local modules. Provides possibility of ignoring warnings by adding text `pyflakes:ignore` in a comment at end of offending line. Returns non-zero status to system when non-ignored warnings are found. Accepts list of directories or files as arguments. When no arguments are given, `PYFLAKES_DEFAULT_ARGS` setting is used (list of strings, by default `['.']`).

  • management
  • pyflakes
  • flakes
Read More

1 snippet posted so far.