4 Summary: passive checker of Python programs
5 Home-page: https://github.com/PyCQA/pyflakes
6 Author: A lot of people
7 Author-email: code-quality@python.org
9 Classifier: Development Status :: 6 - Mature
10 Classifier: Environment :: Console
11 Classifier: Intended Audience :: Developers
12 Classifier: License :: OSI Approved :: MIT License
13 Classifier: Programming Language :: Python
14 Classifier: Programming Language :: Python :: 3
15 Classifier: Programming Language :: Python :: 3 :: Only
16 Classifier: Programming Language :: Python :: Implementation :: CPython
17 Classifier: Programming Language :: Python :: Implementation :: PyPy
18 Classifier: Topic :: Software Development
19 Classifier: Topic :: Utilities
20 Requires-Python: >=3.8
27 A simple program which checks Python source files for errors.
29 Pyflakes analyzes programs and detects various errors. It works by
30 parsing the source file, not importing it, so it is safe to use on
31 modules with side effects. It's also much faster.
33 It is `available on PyPI <https://pypi.org/project/pyflakes/>`_
34 and it supports all active versions of Python: 3.6+.
41 It can be installed with::
43 $ pip install --upgrade pyflakes
48 * Be sure to install it for a version of Python which is compatible
49 with your codebase: ``python#.# -m pip install pyflakes`` (for example,
50 ``python3.10 -m pip install pyflakes``)
52 * You can also invoke Pyflakes with ``python#.# -m pyflakes .`` if you want
53 to run it for a specific python version.
55 * If you require more options and more flexibility, you could give a
61 Pyflakes makes a simple promise: it will never complain about style,
62 and it will try very, very hard to never emit false positives.
64 Pyflakes is also faster than Pylint_. This is
65 largely because Pyflakes only examines the syntax tree of each file
66 individually. As a consequence, Pyflakes is more limited in the
67 types of things it can check.
69 If you like Pyflakes but also want stylistic checks, you want
70 flake8_, which combines
71 Pyflakes with style checks against
73 per-project configuration ability.
79 Share your feedback and ideas: `subscribe to the mailing-list
80 <https://mail.python.org/mailman/listinfo/code-quality>`_
85 Issues are tracked on `GitHub <https://github.com/PyCQA/pyflakes/issues>`_.
87 Patches may be submitted via a `GitHub pull request`_.
88 If you are comfortable doing so, please `rebase your changes`_
89 so they may be applied to main with a fast-forward merge, and each commit is
90 a coherent unit of work with a well-written log message. If you are not
91 comfortable with this rebase workflow, the project maintainers will be happy to
92 rebase your commits for you.
94 All changes should include tests and pass flake8_.
96 .. image:: https://github.com/PyCQA/pyflakes/workflows/Test/badge.svg
97 :target: https://github.com/PyCQA/pyflakes/actions
98 :alt: GitHub Actions build status
100 .. _Pylint: https://pylint.pycqa.org/
101 .. _flake8: https://pypi.org/project/flake8/
102 .. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/
103 .. _`rebase your changes`: https://git-scm.com/book/en/v2/Git-Branching-Rebasing
104 .. _`GitHub pull request`: https://github.com/PyCQA/pyflakes/pulls
109 Please see `NEWS.rst <https://github.com/PyCQA/pyflakes/blob/main/NEWS.rst>`_.