8000 Incorrect signature for capture_exception · Issue #313 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content
Incorrect signature for capture_exception #313
@akx

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] 
56DA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0