Page MenuHomeSoftware Heritage

model: make model entities frozen
ClosedPublic

Authored by douardda on Oct 29 2019, 2:36 PM.

Details

Summary

we do not really need them to be mutable, plus we gain their instances now
being hashable, so we can add them in set() for example.

Diff Detail

Repository
rDMOD Data model
Branch
master
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 8672
Build 12619: tox-on-jenkinsJenkins
Build 12618: arc lint + arc unit

Event Timeline

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/model/hypothesis_strategies.py
92–100

I'd like this to be two different statement (one for draw + builds, one for evolve), for readability.

This revision is now accepted and ready to land.Oct 29 2019, 2:39 PM
swh/model/hypothesis_strategies.py
92–100

ok but what about the combo in test_todict_origin_visits() below then ;-)

swh/model/hypothesis_strategies.py
92–100

* shrug *

updated according comments

This revision was automatically updated to reflect the committed changes.