isudatateam / datateam

Consider using min builtin PTC-W0041
Anti-pattern
Major
3 months ago3 months old
Consider using ets = min(ets, archive_end) instead of the unnecessary if block
 62
 63    ets = sane_date(y2, m2, d2)
 64    archive_end = datetime.date.today() - datetime.timedelta(days=1)
 65    if ets > archive_end: 66        ets = archive_end
 67
 68    return [sane_date(y1, m1, d1), ets]