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
fix: types for logging integration args (getsentry#444)
* fix: types for logging integration args
The sdk supports disabling the LoggingIntegration by passing `None` as
arguments; however, the current types require ints.
This behavior is noted in the docs:
https://docs.sentry.io/platforms/python/logging/#options
```
sentry_sdk.init(integrations=[LoggingIntegration(level=None, event_level=None)])
```
* fix: type for integration's arg
```python
integrations = [
LoggingIntegration(level=None, event_level=None) # type: ignore
]
sentry_sdk.init(integrations=integrations)
```
here are the type errors from mypy
```
Argument "integrations" to "init" has incompatible type "List[LoggingIntegration]"; expected "List[Integration]"
"List" is invariant -- see http://mypy.readthedocs.io/en/latest/common_issues.html#variance
Consider using "Sequence" instead, which is covariant
```
* add missing import
0 commit comments