Skip to content

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Sep 29, 2023

Currently, using the decorator form of trace like this (as mentioned in the docs here):

import sentry_sdk

@sentry_sdk.trace
def do_stuff():

causes mypy to throw a Module "sentry_sdk" does not explicitly export attribute "trace" [attr-defined] error. This adds trace to the top-level __init__.py's __all__ so mypy sees it as being officially exported and stops throwing the error.

@lobsterkatie lobsterkatie marked this pull request as ready for review October 2, 2023 18:33
@lobsterkatie lobsterkatie force-pushed the kmclb-add-trace-to-__all__ branch from e5c520e to 8f5674f Compare October 2, 2023 20:04
@lobsterkatie lobsterkatie merged commit afc488d into master Oct 2, 2023
@lobsterkatie lobsterkatie deleted the kmclb-add-trace-to-__all__ branch October 2, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants