Page MenuHomeSoftware Heritage

scanner: dump json instead of dict
ClosedPublic

Authored by DanSeraf on Thu, Mar 19, 12:42 PM.

Details

Diff Detail

Repository
rDTSCN Code scanner
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

DanSeraf created this revision.Thu, Mar 19, 12:42 PM
DanSeraf abandoned this revision.Thu, Mar 19, 2:12 PM
DanSeraf reclaimed this revision.Thu, Mar 19, 4:18 PM

/with jedi mind trick voice

You want to add types
You want to update the tests

;)

/with jedi mind trick voice

You want to add types
You want to update the tests

;)

nice trick :)

vlorentz accepted this revision.Fri, Mar 20, 11:39 AM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/scanner/model.py
58

I suggest using the indent=4 argument of json.dumps, it makes the JSON somewhat human-readable by adding line breaks and indenting.

Also sort_key=True can be handy

This revision is now accepted and ready to land.Fri, Mar 20, 11:39 AM
DanSeraf marked an inline comment as done.Fri, Mar 20, 11:54 AM
DanSeraf updated this revision to Diff 10174.Fri, Mar 20, 11:54 AM

better json output

This revision was landed with ongoing or failed builds.Fri, Mar 20, 12:17 PM
This revision was automatically updated to reflect the committed changes.