mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 21:44:18 +00:00
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
complexity-analysisflake8linterlinter-flake8pep8pythonpython3static-analysisstatic-code-analysisstyle-guidestyleguidestylelint
This commit fixes two problems that caused by git pre-commit hook
1. flake8 checks non-python files(.md, .txt, ...) and raise errors
```/var/folders/bb/0_8jdgw15f72f18m_fpqwcqr0000gn/T/tmpqbcrt3vn/Users/Curzy/Workspace/flative/hbnn/hbnn/README.md:3:2:
E999 SyntaxError: invalid syntax
/var/folders/bb/0_8jdgw15f72f18m_fpqwcqr0000gn/T/tmpqbcrt3vn/Users/Curzy/Workspace/flative/hbnn/hbnn/README.md:3:20:
E226 missing whitespace around arithmetic operator```
this problem fixed with find_modified_files function
2. flake8 checks excluded files by config(.flake8, config, ...)
```.flake8
[flake8]
ignore = F401
exclude =
.git,
__pycache__,
hbnn/settings.py,
manage.py,
*/migrations
```
```
./hbnn/settings.py:102:80: E501 line too long (83 > 79 characters)
./user/migrations/0001_initial.py:20:80: E501 line too long (88 > 79 characters)
./user/migrations/0001_initial.py:21:80: E501 line too long (103 > 79 characters)
```
this problem fixed with update_execuldes function should contain both original, temp paths
|
||
|---|---|---|
| docs | ||
| example-plugin | ||
| src/flake8 | ||
| tests | ||
| .appveyor.yml | ||
| .bandit.yml | ||
| .coveragerc | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .hgignore | ||
| .hgtags | ||
| .pylintrc | ||
| .travis.yml | ||
| codecov.yml | ||
| CONTRIBUTING.rst | ||
| CONTRIBUTORS.txt | ||
| dev-requirements.txt | ||
| LICENSE | ||
| MANIFEST.in | ||
| pytest.ini | ||
| README.rst | ||
| setup.cfg | ||
| setup.py | ||
| tox.ini | ||
========
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 <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
<https://coglib.com/~icordasc/>`_