Skip to content

sentry_sdk.init fails mypy checks #1415

@dhuckins

Description

@dhuckins

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.5.10

Steps to Reproduce

  1. $ python3.10 -m venv venv
  2. $ source ./venv/bin/activate # assuming unix
  3. [venv] $ pip install sentry-sdk==1.5.10 mypy==0.950 (currently the latest versions of sentry-sdk and mypy)
  4. create file to test (mytest.py for example purposes)
# mytest.py
import sentry_sdk

sentry_sdk.init(dsn="this is a string")
  1. [venv] $ mypy mytest.py

Expected Result

no errors

Actual Result

❯ mypy mytest.py                                        
mytest.py:3: error: Cannot instantiate abstract class "init" with abstract attribute "__exit__"
Found 1 error in 1 file (checked 1 source file)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions