8000 [potel] Fix mypy by sentrivana · Pull Request #4169 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content
< 8000 /div>

[potel] Fix mypy #4169

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
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentry_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def _prepare_event(
if event.get("exception"):
DedupeIntegration.reset_last_seen()

event = new_event
event = new_event # type: Optional[Event] # type: ignore[no-redef]

before_send_transaction = self.options["before_send_transaction"]
if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@

if TYPE_CHECKING:
from typing import Optional
from contextvars import Token
import sentry_sdk.integrations.opentelemetry.scope as scope


class SentryContextVarsRuntimeContext(ContextVarsRuntimeContext):
def attach(self, context):
# type: (Context) -> object
# type: (Context) -> Token[Context]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changed from object to Token[Context] in a recent otel version

scopes = get_value(SENTRY_SCOPES_KEY, context)

should_fork_isolation_scope = context.pop(
Expand Down
Loading
0