end = check_date(term.get("end"))
if start and end:
if end < start:
error(rtyaml.dump(term) + " has end before start.")
if end.year > 2000:
// Check party of current members (historical is too difficult and even recent ones incorrectly have Democratic instead of Democrat, which is inconsistent with the legislators files).
if term.get("party") not in ("Republican", "Democrat"):
After Change
def check_executive_term(term, context):
// Check type.
if term.get("type") not in ("prez", "viceprez"):
error(context, "Term has invalid "type".")
// Check how.
if term.get("how") not in ("election", "succession", "appointment"):
error(context, "Term has invalid "how".")