yasuki_core.install.yaml_to_sql.mrp_text#

mrp_text(dated_texts)[source]#

The rules text from the most-recently-released printing (the MRP standard). Each element is a (release_date, text) pair for one printing that carries text; a null date sorts oldest so a dated printing always wins over an undated one. Return None for an empty list.

Parameters:
dated_textslist of tuple of (date or None, str)

One (release_date, text) pair per printing of the card that has non-empty text.

Returns:
textstr or None

The text on the newest printing, or None if there are no printings.