让免费层限流的报告跟真实限流一致,并给少一块结果的静默失败留下函数名和错误类型。
Co-Authored-By: Grok (agent loop)
This commit is contained in:
co-authored by
Grok (agent loop)
parent
e4ff62c738
commit
a7162db271
@@ -283,7 +283,7 @@ def _date_delta_days(engine_date: str | None, target_date: str | None) -> int |
|
||||
engine_parts = [int(part) for part in engine_date.split("-")[:3]]
|
||||
target_parts = [int(part) for part in target_date.split("-")[:3]]
|
||||
return (date(*engine_parts) - date(*target_parts)).days
|
||||
except Exception:
|
||||
except Exception: # noqa: BLE001 - compared date strings are caller-supplied; an unparseable value is an absent delta
|
||||
return None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user