Skip to content

Commit

Permalink
fix: Explicitly export cron symbols for typecheckers (#3072)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
spladug authored Jun 12, 2024
1 parent a6c03a9 commit e5e2016
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions sentry_sdk/crons/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
from sentry_sdk.crons.api import capture_checkin # noqa
from sentry_sdk.crons.consts import MonitorStatus # noqa
from sentry_sdk.crons.decorator import monitor # noqa
from sentry_sdk.crons.api import capture_checkin
from sentry_sdk.crons.consts import MonitorStatus
from sentry_sdk.crons.decorator import monitor


__all__ = [
"capture_checkin",
"MonitorStatus",
"monitor",
]

0 comments on commit e5e2016

Please sign in to comment.