terrencepreilly / darglint

A python documentation linter which checks that the docstring description matches the definition.
MIT License
481 stars 41 forks source link

DAR202 throws false positive excess returns #205

Open JulianOrteil opened 2 years ago

JulianOrteil commented 2 years ago

Sphinx Docstring Style:

"""Called when :py:meth:`~mymod.MyClass.my_method` raises an error.

The scheduler uses the output of this method to determine
whether the command should be immediately interrupted.

:param exc_type: The type of exception raised.
:type exc_type: :py:class:`Type`
:param exc: The exception raised.
:type exc: :py:class:`Exception`
:param traceback: The frame traceback of the error.
:type traceback: :py:class:`Traceback`

:return: `True` to indicate the error is handled. All other
    returns to the scheduler will be interpreted as the command
    needing to be immediately interrupted.
:rtype: bool
"""

CLI Output: DAR202 Excess "Returns" in Docstring: + return

I believe it is picking up on my "returns to the scheduler" statement.