Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Burnett committed Nov 16, 2022
1 parent 516065d commit 316e83e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions singer_sdk/_singerlib/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,18 @@ class RecordMessage(Message):
"""The time the record was extracted."""

def to_dict(self) -> dict[str, t.Any]:
""" Converts to a dictionary.
"""Return a dictionary representation of the message.
This overrides the default conversion logic, since it uses unnecessary
deep copying and is very slow.
This overrides the default conversion logic, since it uses unnecessary deep copying and is very slow
Returns:
A dictionary with the defined message fields.
"""
result: dict[str, t.Any] = {
'type': 'RECORD',
'stream': self.stream,
'record': self.record
"type": "RECORD",
"stream": self.stream,
"record": self.record,
}
if self.version is not None:
result["version"] = self.version
Expand Down

0 comments on commit 316e83e

Please sign in to comment.