Skip to content

Commit

Permalink
Update validateAvroRoundTrip
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmartradio committed Jan 3, 2024
1 parent fe6e3af commit 64c4de7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/lsst/alert/packet/bin/validateAvroRoundTrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def main():
check_file_round_trip(args.cutout_template,
message.pop('cutoutTemplate')['stampData'])

message_size = len(json.dumps(message).encode('utf-8'))
message_size = len(json.dumps(message, default = repr).encode('utf-8'))

Check failure on line 123 in python/lsst/alert/packet/bin/validateAvroRoundTrip.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

E251

unexpected spaces around keyword / parameter equals

Check failure on line 123 in python/lsst/alert/packet/bin/validateAvroRoundTrip.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

E251

unexpected spaces around keyword / parameter equals
print("Size in bytes of JSON-encoded message (excl. stamps): %d" % (message_size,))
print("Size in bytes of stamps: %d" % (stamp_size,))
print("TOTAL: %d" % (stamp_size + message_size,))
Expand All @@ -135,7 +135,7 @@ def main():
# populated with nulls;
# - Precision has been lost on the floats.
if args.print:
print(json.dumps(message, sort_keys=True, indent=4))
print(json.dumps(message, sort_keys=True, indent=4, default = repr))

Check failure on line 138 in python/lsst/alert/packet/bin/validateAvroRoundTrip.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

E251

unexpected spaces around keyword / parameter equals

Check failure on line 138 in python/lsst/alert/packet/bin/validateAvroRoundTrip.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

E251

unexpected spaces around keyword / parameter equals


if __name__ == "__main__":
Expand Down

0 comments on commit 64c4de7

Please sign in to comment.