From d07913288314e9ab2ddaacd73270f703369c8caa Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Thu, 20 Aug 2020 18:44:57 +0000 Subject: [PATCH] add note to configuration.rst that inline comments are not supported --- docs/source/user/configuration.rst | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/source/user/configuration.rst b/docs/source/user/configuration.rst index 108dd98..4c53877 100644 --- a/docs/source/user/configuration.rst +++ b/docs/source/user/configuration.rst @@ -141,7 +141,7 @@ In our case, if we wanted to, we could also do dist 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 @@ -162,6 +162,26 @@ This would allow us to add comments for why we're excluding items, e.g., dist max-complexity = 10 +.. note:: + + Following the recommended settings for `Python's ``configparser`` `__, |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:: If you're using Python 2, you will notice that we download the