Closed cidrblock closed 6 months ago
If I took the time to read the docs......
It seems I'm missing a critical part of the configuration:
skip-checking-short-docstrings = false
[tool.pydoclint]
allow-init-docstring = true
arg-type-hints-in-docstring = false
check-return-types = false
skip-checking-short-docstrings = false
style = 'google'
The following is then generated:
4: DOC101: Function `test_missing`: Docstring contains fewer arguments than in function signature.
4: DOC103: Function `test_missing`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [bar: int, foo: str].
9: DOC101: Function `test_wrong_format`: Docstring contains fewer arguments than in function signature.
9: DOC103: Function `test_wrong_format`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [bar: int, foo: str].
9: DOC201: Function `test_wrong_format` does not have a return section in docstring
19: DOC101: Function `test_missing_args`: Docstring contains fewer arguments than in function signature.
19: DOC103: Function `test_missing_args`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [bar: int].
Sorry to have bothered you!
-Brad
Hey there, first thanks for pydoclint, it's been super handy across our projects.
I'm not sure if this is in scope for pydoclint or not, but I've noticed a couple cases where I would expect to see an error but none was generated. (This may be outside the scope of what you want pydoclint to do)
Given the following
pyproject.toml
file:Running against the following file:
These are the errors reported:
It appears that
pydoclint
correctly identifies the missing argument in the third function but reports no errors in the first 2.Would it be possible to:
1) Raise an error when none of the arguments are present in the docstring? (function 1) 2) Raise an error when the docstring has an icorrect format ? (function2) This might be covered by number 1 depending on how it is implemented
Thanks again!
-Brad