flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code. https://flake8.pycqa.org
Find a file
Marc Abramowitz d234f22e09 Raise exception when entry_point not callable
E.g.:

```
$ .tox/flake8/bin/flake8 mobileweb
Traceback (most recent call last):
  File ".tox/flake8/bin/flake8", line 9, in <module>
    load_entry_point('flake8', 'console_scripts', 'flake8')()
  File "/Users/marca/dev/git-repos/flake8/src/flake8/main/cli.py", line 16, in main
    app.run(argv)
  File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 316, in run
    self._run(argv)
  File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 299, in _run
    self.initialize(argv)
  File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 289, in initialize
    self.find_plugins()
  File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 143, in find_plugins
    self.check_plugins.load_plugins()
  File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 375, in load_plugins
    plugins = list(self.manager.map(load_plugin))
  File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 267, in map
    yield func(self.plugins[name], *args, **kwargs)
  File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 373, in load_plugin
    return plugin.load_plugin()
  File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 173, in load_plugin
    raise failed_to_load
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "P999" due to Plugin <module 'teamcity.flake8_plugin' from '/Users/marca/dev/git-repos/teamcity-messages/teamcity/flake8_plugin.pyc'> is not a callable. It might be written for an older version of flake8 and might not work with this version.
```

This is nicer than the previous behavior of raising an obscure `PicklingError` and then hanging.

```
$ .tox/flake8/bin/flake8 mobileweb
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/queues.py", line 268, in _feed
    send(obj)
PicklingError: Can't pickle <type 'module'>: attribute lookup __builtin__.module failed
```

See #164
2016-07-28 11:49:58 -07:00
docs Match noqa for users with explanations 2016-07-28 06:48:15 -05:00
src/flake8 Raise exception when entry_point not callable 2016-07-28 11:49:58 -07:00
tests Sort reports by line and column 2016-07-28 19:25:13 +02:00
.appveyor.yml Check for alternate_separator only when truthy 2016-07-22 17:12:49 -05:00
.bandit.yml Configure bandit to ignore subprocess warnings 2016-06-14 07:58:13 -05:00
.gitignore Merge remote-tracking branch 'rewrite/master' into proposed/3.0 2016-03-15 16:00:19 -05:00
.gitlab-ci.yml Add python*-dev packages 2016-06-25 16:00:45 -05:00
.hgignore Ignore ./.tox directory 2014-03-30 23:54:36 +02:00
.hgtags Release v2.2.3 2014-08-25 19:03:13 -05:00
.pylintrc Fix our evaluation formula 2016-02-19 15:30:54 -06:00
.travis.yml Remove mypy from list of tox environments 2016-06-20 13:29:53 -05:00
CONTRIBUTING.rst Symlink the contributing docs to CONTRIBUTING 2016-06-04 15:46:51 -05:00
CONTRIBUTORS.txt Adding myself to CONTRIBUTORS.txt 2016-06-10 11:28:48 +03:00
dev-requirements.txt Switch out dev-requirements for tox 2016-03-17 14:56:54 -05:00
LICENSE Update the copyright in the LICENSE 2016-06-25 10:49:32 -05:00
MANIFEST.in Fix up MANIFEST.in 2016-06-30 15:34:29 -05:00
README.rst Update the README 2016-06-25 20:09:56 -05:00
setup.cfg Update the packaging so wheels work 2016-06-25 11:20:28 -05:00
setup.py Fix handling of logical lines with noqa 2016-07-26 19:45:05 -05:00
tox.ini Update our flake8 testenv dependencies 2016-07-26 19:32:49 +00:00

========
 Flake8
========

Flake8 is a wrapper around these tools:

- PyFlakes
- pycodestyle
- Ned Batchelder's McCabe script

Flake8 runs all the tools by launching the single ``flake8`` command.
It displays the warnings in a per-file, merged output.

It also adds a few features:

- files that contain this line are skipped::

    # flake8: noqa

- lines that contain a ``# noqa`` comment at the end will not issue warnings.
- you can ignore specific errors on a line with ``# noqa: <error>``, e.g.,
  ``# noqa: E234``
- Git and Mercurial hooks
- extendable through ``flake8.extension`` and ``flake8.formatting`` entry
  points


Quickstart
==========

See our `quickstart documentation
<http://flake8.pycqa.org/en/latest/index.html#quickstart>`_ for how to install
and get started with Flake8.


Frequently Asked Questions
==========================

Flake8 maintains an `FAQ <http://flake8.pycqa.org/en/latest/faq.html>`_ in its
documentation.


Questions or Feedback
=====================

If you have questions you'd like to ask the developers, or feedback you'd like
to provide, feel free to use the mailing list: code-quality@python.org

We would love to hear from you. Additionally, if you have a feature you'd like
to suggest, the mailing list would be the best place for it.


Links
=====

* `Flake8 Documentation <https://flake8.pycqa.org/en/latest/>`_

* `GitLab Project <https://gitlab.com/pycqa/flake8>`_

* `All (Open and Closed) Issues
  <https://gitlab.com/pycqa/flake8/issues?scope=all&sort=updated_desc&state=all>`_

* `Code-Quality Archives
  <https://mail.python.org/mailman/listinfo/code-quality>`-

* `Code of Conduct
  <http://flake8.pycqa.org/en/latest/internal/contributing.html#code-of-conduct>`_

* `Getting Started Contributing
  <http://flake8.pycqa.org/en/latest/internal/contributing.html>`_


Maintenance
===========

Flake8 was created by Tarek Ziadé and is currently maintained by `Ian Cordasco
<https://coglib.com/~icordasc/>`_