Open agatti opened 3 years ago
@agatti is it :raise:
or :raises:
? I think it should be the latter.
Thanks @webknjaz ! I just ran into the exact same issue, after writing :raise:
instead of :raises:
and was about to add an "ignore" comment, before I read your comment.
The confusing thing for me is that there appears to be some inconsistency between my pycharm editor and darglint linting.
The raise
keyword is highlighted by pycharm as if it were a valid keyword, but darglint complains about it
$ flake8 src/man_adt/evaluation_utils/entrypoints/flake8.py
src/man_adt/evaluation_utils/entrypoints/flake8.py:5:1: DAR401 Missing exception(s) in Raises section: -r ValueError
src/man_adt/evaluation_utils/entrypoints/flake8.py:8:1: DAR003 Incorrect indentation: ~<
I'm not an expert on docstrings, so I am not really sure, whether or under which conditions raise
(without s
) is actually valid. But in my case this compiles succesfully with sphinx.
You might be missing some darglint configuration to tell it to use sphinx-style docs. Put this in you setup.cfg or darglint config file:
[darglint]
docstring_style = sphinx
Similar to #117, on darglint 1.8.0 I am getting a
DAR003
issue on a docstring that does not look like has anything strange going for it and I am wondering what I am doing wrong with that. The code fragment is as follows:and I also checked that there isn't any other spurious whitespace lingering around:
The darglint configuration is set to default except for the docstring style being
sphinx
and strictness being set tofull
.Interestingly the error message occurs on the first
:raise
line, with the same description as #117, "Incorrect indentation: ~<":Is there anything else I can try to see if this can be sorted out?
Thanks!