-
-
Notifications
You must be signed in to change notification settings - Fork 60
Hackweek: Added Makefile entry to fetch schema; eliminate type errors #1198
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
Conversation
fpacifici
left a comment
There was a problem hiding this 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: | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intentional ?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
| # Properties we get from the "data" dict, which is the actual event body. | ||
|
|
||
| received = _collapse_uint32(int(data["received"])) | ||
| received = _collapse_uint32(data["received"]) |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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.
No description provided.