Page MenuHomeSoftware Heritage

scanner: dump json instead of dict
ClosedPublic

Authored by DanSeraf on Mar 19 2020, 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

/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 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.Mar 20 2020, 11:39 AM
This revision was landed with ongoing or failed builds.Mar 20 2020, 12:17 PM
This revision was automatically updated to reflect the committed changes.