Page MenuHomeSoftware Heritage

model: make to_dict() properly recursive
ClosedPublic

Authored by olasd on Oct 23 2019, 1:56 PM.

Details

Summary

Instead of relying on attr.asdict recursion, we do recursion ourselves. This
simplifies a lot of the inherited to_dict() methods.

Test Plan

tox output is unchanged

Diff Detail

Repository
rDMOD Data Model
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8627
Build 12543: tox-on-jenkinsJenkins
Build 12542: arc lint + arc unit

Event Timeline

olasd created this revision.Oct 23 2019, 1:56 PM
olasd updated this revision to Diff 7416.Oct 23 2019, 2:11 PM

Cleaner recursion

anlambert accepted this revision.Oct 23 2019, 2:21 PM
anlambert added a subscriber: anlambert.

Looks good !

This revision is now accepted and ready to land.Oct 23 2019, 2:21 PM
olasd updated this revision to Diff 7422.Oct 23 2019, 2:22 PM

Rebase

This revision was automatically updated to reflect the committed changes.