codespell 2.3.0__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. codespell-2.4.0/.github/release.yml +5 -0
  2. {codespell-2.3.0 → codespell-2.4.0}/.github/workflows/codespell-private.yml +6 -2
  3. {codespell-2.3.0 → codespell-2.4.0}/.github/workflows/codespell-windows.yml +3 -1
  4. {codespell-2.3.0 → codespell-2.4.0}/.github/workflows/codespell.yml +1 -1
  5. {codespell-2.3.0 → codespell-2.4.0}/.github/workflows/release.yml +2 -2
  6. {codespell-2.3.0 → codespell-2.4.0}/.gitignore +1 -0
  7. {codespell-2.3.0 → codespell-2.4.0}/PKG-INFO +38 -20
  8. {codespell-2.3.0 → codespell-2.4.0}/README.rst +34 -17
  9. {codespell-2.3.0 → codespell-2.4.0}/codespell.egg-info/PKG-INFO +38 -20
  10. {codespell-2.3.0 → codespell-2.4.0}/codespell.egg-info/SOURCES.txt +3 -0
  11. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/__init__.py +1 -1
  12. codespell-2.4.0/codespell_lib/__main__.py +6 -0
  13. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/_codespell.py +110 -112
  14. codespell-2.4.0/codespell_lib/_spellchecker.py +75 -0
  15. codespell-2.4.0/codespell_lib/_text_util.py +27 -0
  16. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/_version.py +2 -2
  17. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/dictionary.txt +2800 -36
  18. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/dictionary_code.txt +12 -6
  19. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/dictionary_en-GB_to_en-US.txt +70 -0
  20. codespell-2.4.0/codespell_lib/data/dictionary_informal.txt +19 -0
  21. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/dictionary_rare.txt +23 -3
  22. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/dictionary_usage.txt +2 -0
  23. codespell-2.4.0/codespell_lib/tests/data/en_GB-additional.wordlist +77 -0
  24. codespell-2.4.0/codespell_lib/tests/data/en_US-additional.wordlist +65 -0
  25. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/tests/test_basic.py +58 -20
  26. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/tests/test_dictionary.py +20 -20
  27. {codespell-2.3.0 → codespell-2.4.0}/pyproject.toml +28 -26
  28. codespell-2.3.0/codespell_lib/__main__.py +0 -9
  29. codespell-2.3.0/codespell_lib/data/dictionary_informal.txt +0 -8
  30. codespell-2.3.0/codespell_lib/tests/data/en_GB-additional.wordlist +0 -36
  31. codespell-2.3.0/codespell_lib/tests/data/en_US-additional.wordlist +0 -27
  32. {codespell-2.3.0 → codespell-2.4.0}/.devcontainer/devcontainer.json +0 -0
  33. {codespell-2.3.0 → codespell-2.4.0}/.devcontainer/post_create.sh +0 -0
  34. {codespell-2.3.0 → codespell-2.4.0}/.github/CODEOWNERS +0 -0
  35. {codespell-2.3.0 → codespell-2.4.0}/.github/dependabot.yml +0 -0
  36. {codespell-2.3.0 → codespell-2.4.0}/.mailmap +0 -0
  37. {codespell-2.3.0 → codespell-2.4.0}/COPYING +0 -0
  38. {codespell-2.3.0 → codespell-2.4.0}/MANIFEST.in +0 -0
  39. {codespell-2.3.0 → codespell-2.4.0}/codespell.egg-info/dependency_links.txt +0 -0
  40. {codespell-2.3.0 → codespell-2.4.0}/codespell.egg-info/entry_points.txt +0 -0
  41. {codespell-2.3.0 → codespell-2.4.0}/codespell.egg-info/requires.txt +0 -0
  42. {codespell-2.3.0 → codespell-2.4.0}/codespell.egg-info/top_level.txt +0 -0
  43. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/__init__.py +0 -0
  44. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/dictionary_names.txt +0 -0
  45. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/data/linux-kernel.exclude +0 -0
  46. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/py.typed +0 -0
  47. {codespell-2.3.0 → codespell-2.4.0}/codespell_lib/tests/__init__.py +0 -0
  48. {codespell-2.3.0 → codespell-2.4.0}/setup.cfg +0 -0
  49. {codespell-2.3.0 → codespell-2.4.0}/tox.ini +0 -0
@@ -0,0 +1,5 @@
1
+ changelog:
2
+ exclude:
3
+ authors:
4
+ - dependabot
5
+ - pre-commit-ci
@@ -14,7 +14,7 @@ jobs:
14
14
  REQUIRE_ASPELL: true
15
15
  RUFF_OUTPUT_FORMAT: github
16
16
  # Make sure we're using the latest aspell dictionary
17
- runs-on: ubuntu-22.04
17
+ runs-on: ubuntu-24.04-arm
18
18
  timeout-minutes: 10
19
19
  strategy:
20
20
  fail-fast: false
@@ -25,6 +25,7 @@ jobs:
25
25
  - "3.10"
26
26
  - "3.11"
27
27
  - "3.12"
28
+ - "3.13"
28
29
  no-toml:
29
30
  - ""
30
31
  include:
@@ -39,6 +40,7 @@ jobs:
39
40
  uses: actions/setup-python@v5
40
41
  with:
41
42
  python-version: ${{ matrix.python-version }}
43
+ allow-prereleases: true
42
44
  - run: sudo apt-get install libaspell-dev aspell-en
43
45
  - name: Install dependencies
44
46
  run: |
@@ -50,7 +52,9 @@ jobs:
50
52
  - run: codespell --help
51
53
  - run: codespell --version
52
54
  - run: make check
53
- - uses: codecov/codecov-action@v4
55
+ - uses: codecov/codecov-action@v5
56
+ with:
57
+ token: ${{ secrets.CODECOV_TOKEN }}
54
58
  # tomli should not be required for the next two steps (and make sure it's not)
55
59
  - run: pip uninstall -yq tomli
56
60
  if: ${{ matrix.no-toml == 'no-toml' }}
@@ -25,4 +25,6 @@ jobs:
25
25
  - run: codespell --help
26
26
  - run: codespell --version
27
27
  - run: pytest codespell_lib
28
- - uses: codecov/codecov-action@v4
28
+ - uses: codecov/codecov-action@v5
29
+ with:
30
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -16,4 +16,4 @@ jobs:
16
16
  with:
17
17
  check_filenames: true
18
18
  # When using this Action in other repos, the --skip option below can be removed
19
- skip: "./.git,./codespell_lib/data,./example/code.c,test_basic.py,*.pyc,README.rst,pyproject-codespell.precommit-toml"
19
+ skip: "./.git,./codespell_lib/data,./example/code.c,test_basic.py,./codespell_lib/tests/data,*.pyc,README.rst,pyproject-codespell.precommit-toml"
@@ -6,10 +6,10 @@ on:
6
6
  types: [published]
7
7
  push:
8
8
  branches:
9
- - master
9
+ - main
10
10
  pull_request:
11
11
  branches:
12
- - master
12
+ - main
13
13
 
14
14
  permissions:
15
15
  contents: read
@@ -1,4 +1,5 @@
1
1
  .coverage
2
+ .venv
2
3
  build
3
4
  dist
4
5
  ld
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: codespell
3
- Version: 2.3.0
4
- Summary: Codespell
3
+ Version: 2.4.0
4
+ Summary: Fix common misspellings in text files
5
5
  Author-email: Lucas De Marchi <lucas.de.marchi@gmail.com>
6
6
  License: GPL-2.0-only
7
7
  Project-URL: homepage, https://github.com/codespell-project/codespell
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.9
22
22
  Classifier: Programming Language :: Python :: 3.10
23
23
  Classifier: Programming Language :: Python :: 3.11
24
24
  Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
25
26
  Requires-Python: >=3.8
26
27
  Description-Content-Type: text/x-rst
27
28
  License-File: COPYING
@@ -168,7 +169,7 @@ You can select the optional dictionaries with the ``--builtin`` option.
168
169
  Ignoring words
169
170
  --------------
170
171
 
171
- When ignoring false positives, note that spelling errors are *case-insensitive* but words to ignore are *case-sensitive*. For example, the dictionary entry ``wrod`` will also match the typo ``Wrod``, but to ignore it you must pass ``wrod``.
172
+ When ignoring false positives, note that spelling errors are *case-insensitive* but words to ignore are *case-sensitive*. For example, the dictionary entry ``wrod`` will also match the typo ``Wrod``, but to ignore it you must pass ``Wrod``.
172
173
 
173
174
  The words to ignore can be passed in two ways:
174
175
 
@@ -210,7 +211,8 @@ Using a config file
210
211
 
211
212
  Command line options can also be specified in a config file.
212
213
 
213
- When running ``codespell``, it will check in the current directory for a file
214
+ When running ``codespell``, it will check in the current directory for an
215
+ `INI file <https://en.wikipedia.org/wiki/INI_file>`_
214
216
  named ``setup.cfg`` or ``.codespellrc`` (or a file specified via ``--config``),
215
217
  containing an entry named ``[codespell]``. Each command line argument can
216
218
  be specified in this file (without the preceding dashes), for example:
@@ -222,15 +224,16 @@ be specified in this file (without the preceding dashes), for example:
222
224
  count =
223
225
  quiet-level = 3
224
226
 
225
- The ``.codespellrc`` file is an `INI file <https://en.wikipedia.org/wiki/INI_file>`_,
226
- which is read using Python's
227
- `configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_.
228
- For example, comments are possible using ``;`` or ``#`` as the first character.
227
+ Python's
228
+ `configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_
229
+ module defines the exact format of INI config files. For example,
230
+ comments are possible using ``;`` or ``#`` as the first character.
229
231
 
230
232
  Codespell will also check in the current directory for a ``pyproject.toml``
231
- (or a path can be specified via ``--toml <filename>``) file, and the
232
- ``[tool.codespell]`` entry will be used, but only if the tomli_ package
233
- is installed for versions of Python prior to 3.11. For example:
233
+ file (or a file specified via ``--toml``), and the ``[tool.codespell]``
234
+ entry will be used. For versions of Python prior to 3.11, this requires
235
+ the tomli_ package. For example, here is the TOML equivalent of the
236
+ previous config file:
234
237
 
235
238
  .. code-block:: toml
236
239
 
@@ -239,25 +242,40 @@ is installed for versions of Python prior to 3.11. For example:
239
242
  count = true
240
243
  quiet-level = 3
241
244
 
242
- These are both equivalent to running:
245
+ The above INI and TOML files are equivalent to running:
243
246
 
244
247
  .. code-block:: sh
245
248
 
246
- codespell --quiet-level 3 --count --skip "*.po,*.ts,./src/3rdParty,./src/Test"
249
+ codespell --skip "*.po,*.ts,./src/3rdParty,./src/Test" --count --quiet-level 3
247
250
 
248
251
  If several config files are present, they are read in the following order:
249
252
 
250
- #. ``pyproject.toml`` (only if the ``tomli`` library is available)
253
+ #. ``pyproject.toml`` (only if the ``tomli`` library is available for Python < 3.11)
251
254
  #. ``setup.cfg``
252
255
  #. ``.codespellrc``
253
256
  #. any additional file supplied via ``--config``
254
257
 
255
258
  If a codespell configuration is supplied in several of these files,
256
259
  the configuration from the most recently read file overwrites previously
257
- specified configurations.
260
+ specified configurations. Any options specified in the command line will
261
+ *override* options from the config files.
258
262
 
259
- Any options specified in the command line will *override* options from the
260
- config files.
263
+ Values in a config file entry cannot start with a ``-`` character, so if
264
+ you need to do this, structure your entries like this:
265
+
266
+ .. code-block:: ini
267
+
268
+ [codespell]
269
+ dictionary = mydict,-
270
+ ignore-words-list = bar,-foo
271
+
272
+ instead of these invalid entries:
273
+
274
+ .. code-block:: ini
275
+
276
+ [codespell]
277
+ dictionary = -,mydict
278
+ ignore-words-list = -foo,bar
261
279
 
262
280
  .. _tomli: https://pypi.org/project/tomli/
263
281
 
@@ -396,13 +414,13 @@ In the scenario where the user prefers not to follow the development version of
396
414
 
397
415
  .. code-block:: sh
398
416
 
399
- wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
417
+ wget https://raw.githubusercontent.com/codespell-project/codespell/main/codespell_lib/data/dictionary.txt
400
418
  codespell -D dictionary.txt
401
419
 
402
420
  The above simply downloads the latest ``dictionary.txt`` file and then by utilizing the ``-D`` flag allows the user to specify the freshly downloaded ``dictionary.txt`` as the custom dictionary instead of the default one.
403
421
 
404
422
  You can also do the same thing for the other dictionaries listed here:
405
- https://github.com/codespell-project/codespell/tree/master/codespell_lib/data
423
+ https://github.com/codespell-project/codespell/tree/main/codespell_lib/data
406
424
 
407
425
  License
408
426
  -------
@@ -119,7 +119,7 @@ You can select the optional dictionaries with the ``--builtin`` option.
119
119
  Ignoring words
120
120
  --------------
121
121
 
122
- When ignoring false positives, note that spelling errors are *case-insensitive* but words to ignore are *case-sensitive*. For example, the dictionary entry ``wrod`` will also match the typo ``Wrod``, but to ignore it you must pass ``wrod``.
122
+ When ignoring false positives, note that spelling errors are *case-insensitive* but words to ignore are *case-sensitive*. For example, the dictionary entry ``wrod`` will also match the typo ``Wrod``, but to ignore it you must pass ``Wrod``.
123
123
 
124
124
  The words to ignore can be passed in two ways:
125
125
 
@@ -161,7 +161,8 @@ Using a config file
161
161
 
162
162
  Command line options can also be specified in a config file.
163
163
 
164
- When running ``codespell``, it will check in the current directory for a file
164
+ When running ``codespell``, it will check in the current directory for an
165
+ `INI file <https://en.wikipedia.org/wiki/INI_file>`_
165
166
  named ``setup.cfg`` or ``.codespellrc`` (or a file specified via ``--config``),
166
167
  containing an entry named ``[codespell]``. Each command line argument can
167
168
  be specified in this file (without the preceding dashes), for example:
@@ -173,15 +174,16 @@ be specified in this file (without the preceding dashes), for example:
173
174
  count =
174
175
  quiet-level = 3
175
176
 
176
- The ``.codespellrc`` file is an `INI file <https://en.wikipedia.org/wiki/INI_file>`_,
177
- which is read using Python's
178
- `configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_.
179
- For example, comments are possible using ``;`` or ``#`` as the first character.
177
+ Python's
178
+ `configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_
179
+ module defines the exact format of INI config files. For example,
180
+ comments are possible using ``;`` or ``#`` as the first character.
180
181
 
181
182
  Codespell will also check in the current directory for a ``pyproject.toml``
182
- (or a path can be specified via ``--toml <filename>``) file, and the
183
- ``[tool.codespell]`` entry will be used, but only if the tomli_ package
184
- is installed for versions of Python prior to 3.11. For example:
183
+ file (or a file specified via ``--toml``), and the ``[tool.codespell]``
184
+ entry will be used. For versions of Python prior to 3.11, this requires
185
+ the tomli_ package. For example, here is the TOML equivalent of the
186
+ previous config file:
185
187
 
186
188
  .. code-block:: toml
187
189
 
@@ -190,25 +192,40 @@ is installed for versions of Python prior to 3.11. For example:
190
192
  count = true
191
193
  quiet-level = 3
192
194
 
193
- These are both equivalent to running:
195
+ The above INI and TOML files are equivalent to running:
194
196
 
195
197
  .. code-block:: sh
196
198
 
197
- codespell --quiet-level 3 --count --skip "*.po,*.ts,./src/3rdParty,./src/Test"
199
+ codespell --skip "*.po,*.ts,./src/3rdParty,./src/Test" --count --quiet-level 3
198
200
 
199
201
  If several config files are present, they are read in the following order:
200
202
 
201
- #. ``pyproject.toml`` (only if the ``tomli`` library is available)
203
+ #. ``pyproject.toml`` (only if the ``tomli`` library is available for Python < 3.11)
202
204
  #. ``setup.cfg``
203
205
  #. ``.codespellrc``
204
206
  #. any additional file supplied via ``--config``
205
207
 
206
208
  If a codespell configuration is supplied in several of these files,
207
209
  the configuration from the most recently read file overwrites previously
208
- specified configurations.
210
+ specified configurations. Any options specified in the command line will
211
+ *override* options from the config files.
209
212
 
210
- Any options specified in the command line will *override* options from the
211
- config files.
213
+ Values in a config file entry cannot start with a ``-`` character, so if
214
+ you need to do this, structure your entries like this:
215
+
216
+ .. code-block:: ini
217
+
218
+ [codespell]
219
+ dictionary = mydict,-
220
+ ignore-words-list = bar,-foo
221
+
222
+ instead of these invalid entries:
223
+
224
+ .. code-block:: ini
225
+
226
+ [codespell]
227
+ dictionary = -,mydict
228
+ ignore-words-list = -foo,bar
212
229
 
213
230
  .. _tomli: https://pypi.org/project/tomli/
214
231
 
@@ -347,13 +364,13 @@ In the scenario where the user prefers not to follow the development version of
347
364
 
348
365
  .. code-block:: sh
349
366
 
350
- wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
367
+ wget https://raw.githubusercontent.com/codespell-project/codespell/main/codespell_lib/data/dictionary.txt
351
368
  codespell -D dictionary.txt
352
369
 
353
370
  The above simply downloads the latest ``dictionary.txt`` file and then by utilizing the ``-D`` flag allows the user to specify the freshly downloaded ``dictionary.txt`` as the custom dictionary instead of the default one.
354
371
 
355
372
  You can also do the same thing for the other dictionaries listed here:
356
- https://github.com/codespell-project/codespell/tree/master/codespell_lib/data
373
+ https://github.com/codespell-project/codespell/tree/main/codespell_lib/data
357
374
 
358
375
  License
359
376
  -------
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: codespell
3
- Version: 2.3.0
4
- Summary: Codespell
3
+ Version: 2.4.0
4
+ Summary: Fix common misspellings in text files
5
5
  Author-email: Lucas De Marchi <lucas.de.marchi@gmail.com>
6
6
  License: GPL-2.0-only
7
7
  Project-URL: homepage, https://github.com/codespell-project/codespell
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.9
22
22
  Classifier: Programming Language :: Python :: 3.10
23
23
  Classifier: Programming Language :: Python :: 3.11
24
24
  Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
25
26
  Requires-Python: >=3.8
26
27
  Description-Content-Type: text/x-rst
27
28
  License-File: COPYING
@@ -168,7 +169,7 @@ You can select the optional dictionaries with the ``--builtin`` option.
168
169
  Ignoring words
169
170
  --------------
170
171
 
171
- When ignoring false positives, note that spelling errors are *case-insensitive* but words to ignore are *case-sensitive*. For example, the dictionary entry ``wrod`` will also match the typo ``Wrod``, but to ignore it you must pass ``wrod``.
172
+ When ignoring false positives, note that spelling errors are *case-insensitive* but words to ignore are *case-sensitive*. For example, the dictionary entry ``wrod`` will also match the typo ``Wrod``, but to ignore it you must pass ``Wrod``.
172
173
 
173
174
  The words to ignore can be passed in two ways:
174
175
 
@@ -210,7 +211,8 @@ Using a config file
210
211
 
211
212
  Command line options can also be specified in a config file.
212
213
 
213
- When running ``codespell``, it will check in the current directory for a file
214
+ When running ``codespell``, it will check in the current directory for an
215
+ `INI file <https://en.wikipedia.org/wiki/INI_file>`_
214
216
  named ``setup.cfg`` or ``.codespellrc`` (or a file specified via ``--config``),
215
217
  containing an entry named ``[codespell]``. Each command line argument can
216
218
  be specified in this file (without the preceding dashes), for example:
@@ -222,15 +224,16 @@ be specified in this file (without the preceding dashes), for example:
222
224
  count =
223
225
  quiet-level = 3
224
226
 
225
- The ``.codespellrc`` file is an `INI file <https://en.wikipedia.org/wiki/INI_file>`_,
226
- which is read using Python's
227
- `configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_.
228
- For example, comments are possible using ``;`` or ``#`` as the first character.
227
+ Python's
228
+ `configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_
229
+ module defines the exact format of INI config files. For example,
230
+ comments are possible using ``;`` or ``#`` as the first character.
229
231
 
230
232
  Codespell will also check in the current directory for a ``pyproject.toml``
231
- (or a path can be specified via ``--toml <filename>``) file, and the
232
- ``[tool.codespell]`` entry will be used, but only if the tomli_ package
233
- is installed for versions of Python prior to 3.11. For example:
233
+ file (or a file specified via ``--toml``), and the ``[tool.codespell]``
234
+ entry will be used. For versions of Python prior to 3.11, this requires
235
+ the tomli_ package. For example, here is the TOML equivalent of the
236
+ previous config file:
234
237
 
235
238
  .. code-block:: toml
236
239
 
@@ -239,25 +242,40 @@ is installed for versions of Python prior to 3.11. For example:
239
242
  count = true
240
243
  quiet-level = 3
241
244
 
242
- These are both equivalent to running:
245
+ The above INI and TOML files are equivalent to running:
243
246
 
244
247
  .. code-block:: sh
245
248
 
246
- codespell --quiet-level 3 --count --skip "*.po,*.ts,./src/3rdParty,./src/Test"
249
+ codespell --skip "*.po,*.ts,./src/3rdParty,./src/Test" --count --quiet-level 3
247
250
 
248
251
  If several config files are present, they are read in the following order:
249
252
 
250
- #. ``pyproject.toml`` (only if the ``tomli`` library is available)
253
+ #. ``pyproject.toml`` (only if the ``tomli`` library is available for Python < 3.11)
251
254
  #. ``setup.cfg``
252
255
  #. ``.codespellrc``
253
256
  #. any additional file supplied via ``--config``
254
257
 
255
258
  If a codespell configuration is supplied in several of these files,
256
259
  the configuration from the most recently read file overwrites previously
257
- specified configurations.
260
+ specified configurations. Any options specified in the command line will
261
+ *override* options from the config files.
258
262
 
259
- Any options specified in the command line will *override* options from the
260
- config files.
263
+ Values in a config file entry cannot start with a ``-`` character, so if
264
+ you need to do this, structure your entries like this:
265
+
266
+ .. code-block:: ini
267
+
268
+ [codespell]
269
+ dictionary = mydict,-
270
+ ignore-words-list = bar,-foo
271
+
272
+ instead of these invalid entries:
273
+
274
+ .. code-block:: ini
275
+
276
+ [codespell]
277
+ dictionary = -,mydict
278
+ ignore-words-list = -foo,bar
261
279
 
262
280
  .. _tomli: https://pypi.org/project/tomli/
263
281
 
@@ -396,13 +414,13 @@ In the scenario where the user prefers not to follow the development version of
396
414
 
397
415
  .. code-block:: sh
398
416
 
399
- wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
417
+ wget https://raw.githubusercontent.com/codespell-project/codespell/main/codespell_lib/data/dictionary.txt
400
418
  codespell -D dictionary.txt
401
419
 
402
420
  The above simply downloads the latest ``dictionary.txt`` file and then by utilizing the ``-D`` flag allows the user to specify the freshly downloaded ``dictionary.txt`` as the custom dictionary instead of the default one.
403
421
 
404
422
  You can also do the same thing for the other dictionaries listed here:
405
- https://github.com/codespell-project/codespell/tree/master/codespell_lib/data
423
+ https://github.com/codespell-project/codespell/tree/main/codespell_lib/data
406
424
 
407
425
  License
408
426
  -------
@@ -9,6 +9,7 @@ tox.ini
9
9
  .devcontainer/post_create.sh
10
10
  .github/CODEOWNERS
11
11
  .github/dependabot.yml
12
+ .github/release.yml
12
13
  .github/workflows/codespell-private.yml
13
14
  .github/workflows/codespell-windows.yml
14
15
  .github/workflows/codespell.yml
@@ -22,6 +23,8 @@ codespell.egg-info/top_level.txt
22
23
  codespell_lib/__init__.py
23
24
  codespell_lib/__main__.py
24
25
  codespell_lib/_codespell.py
26
+ codespell_lib/_spellchecker.py
27
+ codespell_lib/_text_util.py
25
28
  codespell_lib/_version.py
26
29
  codespell_lib/py.typed
27
30
  codespell_lib/data/__init__.py
@@ -1,4 +1,4 @@
1
1
  from ._codespell import _script_main, main
2
2
  from ._version import __version__ # type: ignore[import-not-found]
3
3
 
4
- __all__ = ["_script_main", "main", "__version__"]
4
+ __all__ = ["__version__", "_script_main", "main"]
@@ -0,0 +1,6 @@
1
+ import sys
2
+
3
+ from ._codespell import _script_main
4
+
5
+ if __name__ == "__main__":
6
+ sys.exit(_script_main())