Closed MT-0 closed 3 years ago
It's because of the backslash. A backslash isn't necessary, because there's no pattern matching or anything; an '' is just an ''. You should be able to change "*args" to "*args" or "args" and it ought to work.
This arose from a conflict between the errors raise by darglint
and flake8-rst-docstrings
. The above code validates using flake8-rst-docstrings
but does not in darglint
and removing the backslash then the reverse is true.
Looking at https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html#example-google then it seems that the backslash is expected outside the "Args" section (so that *
is not interpreted as the start of an emphasis block) but there is a special case in the "Args" section where it is not expected.
It looks like there is an open issue in flake8-rst-docstrings
about this and it needs fixing at their end rather than in this package.
With the
test.py
file:and the
.darglint
file:Running
darglint test.py
outputs: