Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"extension" option and config parameter doesn't override defaults #157

Open
nega0 opened this issue Apr 4, 2024 · 1 comment
Open

"extension" option and config parameter doesn't override defaults #157

nega0 opened this issue Apr 4, 2024 · 1 comment

Comments

@nega0
Copy link

nega0 commented Apr 4, 2024

I don't want to check .rst or .txt files, only .bar files.

Given:

$ ls
foo.bar         foo.baz         foo.rst         foo.txt

running doc8 gives:

$ doc8 -v -e .bar .
Scanning...
  Selecting './foo.bar'
  Selecting './foo.txt'
  Selecting './foo.rst'
---8<---

The same behavior occurs when using a config file. In my case, pyproject.toml. This was suprising as one would expect that setting an option would override that option's defaults.

Obviously one could work around this using shell expansion (doc8 **/*.rst), and thats ok for command line use. But, my ultimate goal is to control doc8 via config file like I do with other tooling, and doing:

[tool.doc8]
ignore-path = [
"*.txt",
"*/*.txt",
"*/*/*.txt",
"*/*/*/*.txt",
"*/*/*/*/*.txt",
"*/*/*/*/*/*.txt",
]

is just inelegant.

@nega0
Copy link
Author

nega0 commented Apr 4, 2024

As an aside, while taking a quick poke with pdb, it doesn't appear that any normalization/de-duplication happens when merging the "extension" setting. Maybe it happens later? 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant