terrencepreilly / darglint

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

Add skip property #152

Closed saroad2 closed 3 years ago

saroad2 commented 3 years ago

User can now set darglint to ignore property methods using the ignore-properties directive

Why is it good for us? In my codebase, I use the sphinx syntax to document my code. Right now, darglint enforce me to add the :return: and :rtype: section for all property methods. In my opinion, This is redundant since there is no actual need to use this methodologic documentation for property methods. Simple one-liner documentation is sufficient enough in that case and sometimes it is much clearer than a long pedantic description.

Therefore, one is now able to decide whether for darglint to skip property methods or not using the ignore-properties directive.

terrencepreilly commented 3 years ago

Thanks for the PR! This seems like a good idea, and it's well implemented. Could you some tests, though?

saroad2 commented 3 years ago

Sure thing! I added a couple of unit tests, but I'm not sure they're sufficient enough. Let me know if additional tests are needed, and where to add them.

saroad2 commented 3 years ago

Hey @terrencepreilly,

I believe I fixed everything you pointed out, let me know if I missed something.

terrencepreilly commented 3 years ago

I'm sorry it took me so long to respond. We had a power outage for several days, so I lost a weekend.

It looks like the travis-ci errors are due to a dependency failure for tests in Python3.6, so nothing to worry about.

Thanks for the updates, it looks great! I'll include this with the next release (probably the weekend of 2021-02-20.)