Skip to content

Docs request: how to put check-filenames and ignore-words-list into pyproject.toml #2839

@jamesbraza

Description

@jamesbraza

How can I put check-filenames, check-hidden, and ignore-words-list into pyproject.toml?

In the tests there doesn't seem to be a case for this: https://github.com/codespell-project/codespell/blob/v2.2.4/codespell_lib/tests/test_basic.py#L1028

From a GitHub Search, there's no results either: tool.codespell filename:pyproject.toml

And none of the below keys are working for me:

[tool.codespell]

check-filenames = true
check-hidden = true
ignore-words-list = ["acn"]
> codespell .
usage: codespell [-h] [--version] [-d] [-c] [-w] [-D DICTIONARY] [--builtin BUILTIN-LIST] [--ignore-regex IGNORE_REGEX] [-I FILE] [-L WORDS] [--uri-ignore-words-list WORDS] [-r REGEX] [--uri-regex URI_REGEX] [-s] [--count] [-S SKIP]
                 [-x FILE] [-i INTERACTIVE] [-q QUIET_LEVEL] [-e] [-f] [-H] [-A LINES] [-B LINES] [-C LINES] [--config CONFIG] [--toml TOML]
                 [files ...]
codespell: error: unrecognized arguments: True

From https://stackoverflow.com/questions/75377334/toml-how-to-have-key-without-value it seems keys without values aren't possible in .toml.


Related: #2718

Here is my old .codespellrc:

[codespell]
check-filenames =
check-hidden =
ignore-words-list = acn

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions