Skip to content

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

Open
@nega0

Description

@nega0

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions