tidypy icon indicating copy to clipboard operation
tidypy copied to clipboard

Configuration is undocumented

Open scottj97 opened this issue 6 years ago • 3 comments

The Configuration section of the README currently says "TODO", and the command tidypy default-config doesn't even tell me what filename to use for the config it prints to stdout.

How do I make a config file for tidypy? At least document the filename it's looking for.

scottj97 avatar Feb 25 '19 23:02 scottj97

There's two things I'm trying to do, and it seems that anyone running tidypy through pytest will need to do the same. (1) exclude .pytest_cache, and (2) disable one or the other of pydocstyle:D212 or pydocstyle:D213 since they are mutually exclusive.

I got item (1) working eventually, but item (2) is still unsolved.

My pyproject.toml looks like so:

[tool.tidypy]
exclude = ["\\.pytest_cache/.*"]

[pydocstyle]
disabled = ["D213"]

Though I've tried many other things. D213 is still failing when I run tidypy, so this disabled flag is not getting recognized.

scottj97 avatar Feb 26 '19 00:02 scottj97

Figured it out:

[tool.tidypy]
exclude = ["\\.pytest_cache/.*"]

[tool.tidypy.pydocstyle]
disabled = ["D213"]

This should be documented somewhere as an example pyproject.toml file.

scottj97 avatar Feb 26 '19 00:02 scottj97

Absolutely agree. That topic needs more documentation.

Anyone else stumbling upon this in the meantime can look at the pyproject.toml at the root of this repository for an example of how TidyPy is configured to operate on itself.

jayclassless avatar Feb 27 '19 00:02 jayclassless