PyCQA / pydocstyle

docstring style checker
http://pydocstyle.org
MIT License
1.11k stars 189 forks source link

Fix false positive of google convention missing args descriptions #619

Closed stinovlas closed 1 year ago

stinovlas commented 1 year ago

Closes #618.

I'm not really happy about this heuristic, but it seems to do the work. It would be cleaner change the splitting of docstring to sections, but I'm afraid its not possible in general case due to numpy style having no indent. Anyway, this should fix the problem with google style convention and additional lines being considered part of the section.

The solution may not work in mixed tabs/spaces docstring where each line has different whitespace prefix, but I find this to be pretty obscure case (and it's obviously not covered by pydocstyle tests anyway).