Skip to content

Incorrect signature for capture_exception #313

Description

@akx

The type hint for capture_exception() implies only ValueErrors can be passed in, which causes a type check warning in IDEs such as PyCharm when you pass in a non-ValueError exception.

def capture_exception(error=None):
# type: (ValueError) -> Optional[str]

I suppose the hint should be more like

# type: (BaseException) -> Optional[str] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions