Page MenuHomeSoftware Heritage

model: Don't export origin['type']
ClosedPublic

Authored by olasd on Oct 18 2019, 11:58 AM.

Details

Summary

This prepares the removal of origin.type from swh.model

Test Plan

tox, with added round-trip test for origins

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.Oct 18 2019, 11:58 AM
ardumont accepted this revision.Oct 18 2019, 12:18 PM
This revision is now accepted and ready to land.Oct 18 2019, 12:18 PM

I'm not sure that's a good idea. What about this:

if r['type'] is None:
    del r['type']
olasd added a comment.Oct 18 2019, 1:22 PM

I'm not sure that's a good idea. What about this:

if r['type'] is None:
    del r['type']

No. I want to ignore the argument, whatever it may be.

This revision was automatically updated to reflect the committed changes.