jepperaskdk / pydoctest

Python docstring signature verification
MIT License
20 stars 3 forks source link

Exclude patterns #36

Closed jepperaskdk closed 2 years ago

jepperaskdk commented 2 years ago

Suggestion by @hhalaby to add exclude-patterns for classes, methods and functions.

The suggestion was a boolean, to disable all/none of the 3 types, however, I think the solution will be more useful if patterns are given instead.

So for each of the three types, add these options (classes as example): CLI: pydoctest --exclude-classes "Test*" JSON: exclude_classes: ["Test*"]

Here, "Test" matches all class-names that start with "Test". To exclude all classes, you would just do "". Private methods would be "__*" and so on. What do you think of this solution @hhalaby?

hhalaby commented 2 years ago

Pattern matching is a great solution instead of a boolean but I'm afraid the patterns you've suggested might be too greedy and some trial and error might be needed.

Wildcards ("*") are always known to have edge cases.

Once you do a working solution ping me so I take a look

jepperaskdk commented 2 years ago

Released in 0.1.20