You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This check verifies that the `Raises` section of a method docstring
contains the same exception types present in `raise` statements in the
code.
Some checks were correctly failing because of wrong documentation or
typos, but some fail only because `pydoclint` is not smart enough to
figure out the type of variables, so one must always have `raise
ExceptionType` in the code to make the check pass. It also fails when
the exception is raised indirectly, but we want to document it anyways,
for example if raised by some utility function or private method.
For cases where this is possible, the code was changed to do explicit
`raise ExceptionType`, for other cases the check is simply disabled. In
other cases a `raise` was replaced with an `assert_never` to make the
check pass and also make sure a failure is detected by `mypy` instead of
at runtime.
Signed-off-by: Leandro Lucarella <[email protected]>
0 commit comments