Closed MartinThoma closed 2 years ago
See https://github.com/terrencepreilly/darglint#type-annotations. In particular,
Darglint only accepts types accepted by Python (see PEP 484.) That is, it does not accept parentheses in type signatures. (If parentheses are used in the type signature, Darglint will mark that argument as missing. See Issue #90.)
So types like tuple
won't work. You're also calling this with the numpy parser, not Sphinx.
Having types in the documentation and types in the annotations is a little redundant, unless you're trying to transition a codebase to using type annotations. It would probably be better to just leave them out if you can.
I'm currently adding type annotations for PyPDF2 (PR) and I check with mypy + typeguard if the types I add make sense.
I would also like to check with darglint if the docstrings are good. However, darglint seems not to recongize anything. Take this for example:
Sphinx renders it fine. Why does darglint still tell me the following?