Skip to content

Conversation

@dbennett-sentry
Copy link
Contributor

No description provided.

@dbennett-sentry dbennett-sentry requested a review from a team as a code owner August 4, 2020 19:04
Copy link
Contributor

@fpacifici fpacifici left a comment

Choose a reason for hiding this comment

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

cool

# deprecated unwrapped event message == insert
action_type = ProcessorAction.INSERT
try:

Copy link
Contributor

Choose a reason for hiding this comment

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

intentional ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope.

self.extract_custom(processed, event, metadata)

sdk = data.get("sdk", None) or {}
sdk = data.get("sdk", None) or {} # type: ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the issue here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"sdk" does not exists on the data object.

@fpacifici fpacifici changed the title Added Makefile entry to fetch schema; eliminate type errors Hackweek: Added Makefile entry to fetch schema; eliminate type errors Aug 4, 2020
# Properties we get from the "data" dict, which is the actual event body.

received = _collapse_uint32(int(data["received"]))
received = _collapse_uint32(data["received"])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The extra int here is probably a bug as int(None) fails, _collapse_uint32(None) returns None, and the subsequent code checks for None

EventData = JSONSchema["schema/event.schema.json"]


class Event(TypedDict):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this class is duplicate of InsertEvent below. We should have only one.

@dbennett-sentry dbennett-sentry merged commit 0bfb660 into wip/jsonschema-mypy Aug 4, 2020
@dbennett-sentry dbennett-sentry deleted the dbennett/event-typing-1 branch August 4, 2020 21:49
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.

3 participants