Keep the missing-weekday note honest about market holidays
A weekday with no published index is usually just a market holiday (~10/yr), not a fault. The WARNING still earns its place as the guard against inferring missing from an error code, but the comment should not claim more than it can. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -289,10 +289,11 @@ class SecClient:
|
|||||||
try:
|
try:
|
||||||
text = await self.get_text(url)
|
text = await self.get_text(url)
|
||||||
except SecNotFoundError:
|
except SecNotFoundError:
|
||||||
# Absent is normal on a weekend (SEC publishes business days only). On a
|
# Absent on a weekend is routine (SEC publishes business days only); on a
|
||||||
# weekday it is not: a SEC hiccup — or a rejection page misread as absent
|
# weekday it is either a market holiday or something worth a look — a SEC
|
||||||
# — would otherwise let the importer advance past real filings silently,
|
# hiccup, or a rejection page misread as absent, would otherwise let the
|
||||||
# so surface it at WARNING instead of hiding it in the info stream.
|
# importer advance past real filings silently. Log-level only, no alert:
|
||||||
|
# cheaper than carrying a holiday calendar just to stay quiet ~10 days/yr.
|
||||||
logger.log(
|
logger.log(
|
||||||
logging.INFO if day.weekday() >= 5 else logging.WARNING,
|
logging.INFO if day.weekday() >= 5 else logging.WARNING,
|
||||||
"no daily index published for %s (%s)",
|
"no daily index published for %s (%s)",
|
||||||
|
|||||||
Reference in New Issue
Block a user