Skip to content

shouldn't raise DCO050 if all exceptions are caught #30

@Xoriun

Description

@Xoriun

I have a method that can raise some exceptions but all of those manually raise exception are caught with except clauses.
Imo, in this case it would be unnecessary to have the Raises: block in the docstring of the method.

MWE:

def test():
    """docstring."""
    try:
        raise RuntimeError('test')
    except RuntimeError:
        print('caught')

This raises an DCO050 in the docstring line although this RuntimeError will never be propagated to outside the method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions