Skip to content

ref: fix types for sentry.utils.snowflake #72019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

asottile-sentry
Copy link
Member

a bit of a hack -- I originally tried removing the mixin but there are checks for it in the outbox code -- is there a better way to detect if a model is a snowflake model there rather than isinstance of this mixin?

@asottile-sentry asottile-sentry requested a review from a team June 4, 2024 16:39
@asottile-sentry asottile-sentry requested a review from a team as a code owner June 4, 2024 16:39
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 4, 2024
@markstory
Copy link
Member

is there a better way to detect if a model is a snowflake model there rather than isinstance of this mixin?

We could check for the method that the mixin provides. I agree with your comments that this logic could be done as a module level function.

@asottile-sentry
Copy link
Member Author

is there a better way to detect if a model is a snowflake model there rather than isinstance of this mixin?

We could check for the method that the mixin provides. I agree with your comments that this logic could be done as a module level function.

ah well my goal was to kill the mixin entirely since that's the part that can't be typed properly :S

@markstory
Copy link
Member

ah well my goal was to kill the mixin entirely since that's the part that can't be typed properly

Making the mixin into a module function is something I can take care of.

@asottile-sentry
Copy link
Member Author

ah well my goal was to kill the mixin entirely since that's the part that can't be typed properly

Making the mixin into a module function is something I can take care of.

sweet -- will merge this and let you take care of that -- thanks!

@asottile-sentry asottile-sentry merged commit 1e15b58 into master Jun 4, 2024
52 of 53 checks passed
@asottile-sentry asottile-sentry deleted the asottile-types-utils-snowflake branch June 4, 2024 19:55
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants