Skip to content

Commit 04c372b

Browse files
oddhackDimitriPapadopoulos
authored andcommitted
Update "Using a config file" README entry to document behavior with '-' in value fields
See #3474 (comment)
1 parent 73e3e28 commit 04c372b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.rst

+17
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,23 @@ which is read using Python's
178178
`configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_.
179179
For example, comments are possible using ``;`` or ``#`` as the first character.
180180

181+
Values in an INI file entry cannot start with a ``-`` character, so if you need to do this,
182+
structure your entries like this:
183+
184+
.. code-block:: ini
185+
186+
[codespell]
187+
dictionary = mydict,-
188+
ignore-words = bar,-foo
189+
190+
instead of these invalid entries:
191+
192+
.. code-block:: ini
193+
194+
[codespell]
195+
dictionary = -,mydict
196+
ignore-words = -foo,bar
197+
181198
Codespell will also check in the current directory for a ``pyproject.toml``
182199
(or a path can be specified via ``--toml <filename>``) file, and the
183200
``[tool.codespell]`` entry will be used, but only if the tomli_ package

0 commit comments

Comments
 (0)