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
Branch
dump-json
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11245
Build 16986: tox-on-jenkinsJenkins
Build 16985: arc lint + arc unit

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.