doc8 icon indicating copy to clipboard operation
doc8 copied to clipboard

doc8 does not load ignore-path from pyproject.toml

Open ssbarnea opened this issue 2 years ago • 4 comments

I tried used two versions of what it was supposed to be config in toml file and I observed that running doc8 failed to use the ignore. On the other hand putting configuration inside setup.cfg worked.

case 1

# pyproject.toml
[tool.doc8]
ignore-path = [".tox"]

case 2

# pyproject.toml
[tool.doc8]
ignore-path = ".tox"

None of these works and based on docs, at least should have worked.

ssbarnea avatar Nov 10 '21 15:11 ssbarnea

I found that the following does work in pyproject.toml when using doc8 0.11.1 with tomli installed:

[tool.doc8]
ignore_path = ["docs/build"]

argparse.ArgumentParser replaces hyphens in argument names with underscores. When doc8 loads an INI file, it renames the options to match the names returned by argparse and doc8 uses the underscore names internally. I'm guessing it's a bug that doc8 does not also normalize option names when they are loaded from pyproject.toml.

ejd avatar Apr 29 '22 14:04 ejd

A patch would be welcomed.

ssbarnea avatar Apr 29 '22 15:04 ssbarnea

See #85

ejd avatar May 02 '22 14:05 ejd

This issue is now resolved.

ejd avatar May 17 '22 19:05 ejd