Open LinuxOnTheDesktop opened 1 month ago
Indeed, that's a convoluted sentence. Could you suggest a better alternative?
I am afraid that I cannot. For, I do not know what the original sentence means. If you were to convey to me the various things that the sentence intends, then I could rewrite it. Yet, if you do that, then you yourself have gone part of the way already to rewriting the sentence!
I think it means:
Codespell will also check in the current directory for a pyproject.toml file (or a path specified via
--toml
), and the [tool.codespell] entry will be used. This works automatically if using Python >= 3.11, but requires the tomli package to be installed for Python <3.11.
Exactly. If you think about it, that's the only interpretation that makes sense.
bwitt's formulation is an improvement. Further improvement is possible and desirable. How then about the following?
A yet further form of configuration file is possible, namely, configuration via 'TOML' file. This way of configuring codespell requires Python >= 3.11 or else the package called 'tomli'. The configuration file can be called
pyproject.toml
and reside in the current directory. Alternatively one can pass a full path viacodespell --toml
. In either case, the configuration entry within the file must be called[tool.codespell]
. Here is an example [the example, I mean, that follows immediately in the existing README].
Still: the plethora of configuration methods is making things complex. Perhaps what is really needful is a set of subheadings, one per type of file, and, under each subheading, a table presenting each type of file. Each table would have fields that include:
The following is very hard to parse.
The main problem is a scope-ambiguity (or at least something like that). For, what does the 'only if' clause qualify? For instance, if I have Python <3.11, can I use a .toml file at all?