Page MenuHomeSoftware Heritage

model: make to_dict() properly recursive
ClosedPublic

Authored by olasd on Wed, Oct 23, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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

Cleaner recursion

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

Looks good !

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

Rebase

This revision was automatically updated to reflect the committed changes.