Staging instance, all changes can be removed at any time

Skip to content

Tag model entities with their "type"

this aims at preventing constant usage of isinstance() based dispatch code when writing generic code handling model entities.

For example, the "object_type" argument of JournalWriter.write_addition() has become superflous now we only pass model entities, etc.

This idea comes olasd's reading of mypy doc:

https://mypy.readthedocs.io/en/latest/literal_types.html#tagged-unions


Migrated from D3152 (view on Phabricator)

Merge request reports

Loading