Use subclasses instead of instances to define consent requirements.
Review Request #9937 — Created May 15, 2018 and submitted
ConsentRequirement
has been renamed toBaseConsentRequirement
, and
instead of defining an instance and passing in state, it's now defined
initially as a subclass that's then instantiated. Doing so makes it
easier to construct a requirement (no need to override__init__
, just
set attributes and instantiate), and allows for having a standard set of
requirements that applications can further customize through subclassing.It also gets rid of the "learn more" URL, which ended up not being needed
in current form.
Unit tests pass.
Description | From | Last Updated |
---|---|---|
Do we gain anything be registering an instance vs registering the class itself? What does instantiating do for us? |
brennie |