"""只比较真实到货时间,不将未知时间或托盘编号作为先后依据。""" from datetime import datetime from typing import Any def requires_fifo_skip_reason( pallet_id: int, arrived_at: datetime | None, candidate: dict[str, Any] | None ) -> bool: return bool( arrived_at is not None and candidate is not None and candidate['pallet_id'] != pallet_id and candidate['site_arrived_at'] < arrived_at )