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
Hi!
Just recently stumbled upon this use-case myself. I'd putten `Verbose = True` in my `setup.cfg` under the `[flake8]` section.
This stacktrace ain't all that helpful for those who don't mind digging into other's code, so I hope my PR might be of aid/inspiration to help ease the user's experience =)
```
> python -m pipenv run python -m flake8 overtime_calculator
C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\pycodestyle.py:113: FutureWarning: Possible nested set at position 1
EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
Traceback (most recent call last):
File "C:\Program Files\Python37\Lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Program Files\Python37\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\__main__.py", line 4, in <module>
cli.main()
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\main\cli.py", line 16, in main
app.run(argv)
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\main\application.py", line 396, in run
self._run(argv)
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\main\application.py", line 383, in _run
self.initialize(argv)
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\main\application.py", line 367, in initialize
self.parse_configuration_and_cli(argv)
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\main\application.py", line 212, in parse_configuration_and_cli
self.option_manager, self.config_finder, argv
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\options\aggregator.py", line 46, in aggregate_options
original_values.isolated)
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\options\config.py", line 297, in parse
return self.merge_user_and_local_config()
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\options\config.py", line 261, in merge_user_and_local_config
config = self.parse_local_config()
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\options\config.py", line 228, in parse_local_config
return self._parse_config(config)
File "C:\Users\x10an14\.virtualenvs\overtime-calculator-voKtduX3\lib\site-packages\flake8\options\config.py", line 207, in _parse_config
value = method(self.program_name, option_name)
File "C:\Program Files\Python37\Lib\configparser.py", line 818, in getint
fallback=fallback, **kwargs)
File "C:\Program Files\Python37\Lib\configparser.py", line 808, in _get_conv
**kwargs)
File "C:\Program Files\Python37\Lib\configparser.py", line 802, in _get
return conv(self.get(section, option, **kwargs))
ValueError: invalid literal for int() with base 10: 'True'
```
|
||
|---|---|---|
| docs | ||
| example-plugin | ||
| src/flake8 | ||
| tests | ||
| .appveyor.yml | ||
| .bandit.yml | ||
| .coveragerc | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .hgignore | ||
| .hgtags | ||
| .mailmap | ||
| .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
<http://www.coglib.com/~icordasc/>`_