Skip to content

Commit e5e2016

Browse files
authored
fix: Explicitly export cron symbols for typecheckers (#3072)
Mypy with no_implicit_reexport = true does not see the symbols in sentry_sdk.crons as exported: my_file.py:10: error: Module "sentry_sdk.crons" does not explicitly export attribute "monitor" [attr-defined] Adding the symbols to __all__ marks them as exported and silences the error.
1 parent a6c03a9 commit e5e2016

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

sentry_sdk/crons/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
from sentry_sdk.crons.api import capture_checkin # noqa
2-
from sentry_sdk.crons.consts import MonitorStatus # noqa
3-
from sentry_sdk.crons.decorator import monitor # noqa
1+
from sentry_sdk.crons.api import capture_checkin
2+
from sentry_sdk.crons.consts import MonitorStatus
3+
from sentry_sdk.crons.decorator import monitor
4+
5+
6+
__all__ = [
7+
"capture_checkin",
8+
"MonitorStatus",
9+
"monitor",
10+
]

0 commit comments

Comments
 (0)