mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-11 15:24:18 +00:00
add note to configuration.rst that inline comments are not supported
This commit is contained in:
parent
e897cfac39
commit
d079132883
1 changed files with 21 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ In our case, if we wanted to, we could also do
|
||||||
dist
|
dist
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
|
||||||
This would allow us to add comments for why we're excluding items, e.g.,
|
This allows us to add comments for why we're excluding items, e.g.
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
|
|
@ -162,6 +162,26 @@ This would allow us to add comments for why we're excluding items, e.g.,
|
||||||
dist
|
dist
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Following the recommended settings for `Python's ``configparser`` <https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour>`__, |Flake8| does not support inline comments for any of the keys. So while this is fine:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
per-file-ignores =
|
||||||
|
# imported but unused
|
||||||
|
__init__.py: F401
|
||||||
|
|
||||||
|
this is not:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
per-file-ignores =
|
||||||
|
__init__.py: F401 # imported but unused
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you're using Python 2, you will notice that we download the
|
If you're using Python 2, you will notice that we download the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue