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
Nekokatt e6a5f6a663 Support linting when missing sem_open syscall
Platforms such as Termux on Android, and other exotic devices
do not provide a sem_open implementation on the OS level. This
is problematic, as the error resulting from this occurs when
calling multiprocessing.Pool, throwing an unhandled ImportError.

The issue itself is outlined in https://bugs.python.org/issue3770.

This change allows devices missing this system call to respond
to the missing feature by falling back to synchronous execution,
which appears to be the default behaviour if the multiprocessing
module is not found.

This change also adds a potential fix for developers working
on platforms where multiprocessing itself cannot be imported.
The existing code would set the name referencing the import to
None, but there are no clear checks to ensure this does not
result in an AttributeError later when multiprocessing.Pool
has accession attempts.

Existing users should see no difference in functionality, as they
will assumably already be able to use flake8, so will not be
missing this sem_open call.

Users on devices without the sem_open call will now be able
to use flake8 where they would be unable to before due to
unhandled ImportErrors.
2020-08-27 15:41:25 -07:00
docs fix link in configuration docs 2020-08-22 13:09:16 -07:00
example-plugin Add an example plugin project to source tree 2016-10-25 18:21:50 -05:00
src/flake8 Support linting when missing sem_open syscall 2020-08-27 15:41:25 -07:00
tests Support linting when missing sem_open syscall 2020-08-27 15:41:25 -07:00
.appveyor.yml Cleanup CI and add python 3.8 support 2019-11-05 10:52:55 +01:00
.bandit.yml Simplify bandit config and allow assert 2019-09-07 23:42:33 -07:00
.coveragerc instrument coverage on tests and require 100% coverage there 2020-03-23 12:15:29 -07:00
.gitignore ignore .coverage files in --parallel-mode 2019-05-01 17:08:10 +01:00
.gitlab-ci.yml switch dogfood to use python3 2020-05-07 11:29:37 -07: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
.mailmap Update name across the project post-marriage 2017-07-27 18:47:38 -05:00
.pre-commit-config.yaml upgrade black and run via pre-commit 2020-08-27 15:30:14 -07:00
.pre-commit-hooks.yaml Turn off pre-commit's automated multiprocessing 2019-01-27 17:26:45 -08:00
.pylintrc move from optparse to argparse 2019-08-17 20:09:45 -07:00
.travis.yml Cleanup CI and add python 3.8 support 2019-11-05 10:52:55 +01:00
codecov.yml Add whitespace fixers 2019-09-07 23:49:47 -07:00
CONTRIBUTING.rst Add CONTRIBUTING.rst file refering to webpage. 2017-05-15 11:09:07 +01:00
CONTRIBUTORS.txt Tidy up last few bits for performance improvement 2016-12-20 18:29:10 -06: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 Revert "Update release machinery to include manpages" 2016-11-14 09:49:03 -06:00
pytest.ini fix CI build 2019-07-08 09:07:37 -07:00
README.rst Clearer docs, NOQA_INLINE_REGEXP comment - fixes #469 2018-10-28 20:17:01 +01:00
setup.cfg Allow the new pycodestyle alpha 2020-04-23 15:13:41 -07:00
setup.py Move setup metadata to setup.cfg 2019-07-08 20:14:44 +00:00
tox.ini upgrade black and run via pre-commit 2020-08-27 15:30:14 -07: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``. Multiple codes can be given, separated by comma. The ``noqa`` token is case insensitive, the colon before the list of codes is required otherwise the part after ``noqa`` is ignored
- 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 <http://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
<http://www.coglib.com/~icordasc/>`_