terrencepreilly / darglint

A python documentation linter which checks that the docstring description matches the definition.
MIT License
481 stars 41 forks source link

Ignore methods and functions by decorator #179

Open bentheiii opened 2 years ago

bentheiii commented 2 years ago

We'd like the option to ignore functions marked with certain decorators. This is mostly useful for services and frameworks, where certain decorators can mark a function as a route or option, and the docstring has special meanings.

terrencepreilly commented 2 years ago

That seems reasonable. There's a similar flag, --ignore-regex, which allows you to ignore functions which match a given regex. Perhaps something similar could be added for decorators? (Like, --decorator-ignore-regex, or something.) Feel free to open a PR.