mirror of
https://github.com/ZhuLinsen/daily_stock_analysis
synced 2026-09-20 10:53:33 +08:00
feat: harden JP/KR suffix market support (#1817)
* feat: harden JP/KR suffix market support * fix: define yfinance index quote metadata * fix(review-feedback-1817): Handle JP 4-digit bare-code lookup in analysis paths * fix(review-feedback-1817): Route 4-digit JP bases through API normalization * fix(review-feedback-1817): 补齐外部 API/provider/运行时配置风险说明或证明该检测为误报
This commit is contained in:
@@ -205,6 +205,11 @@ def _resolve_and_normalize_input(raw_value: str) -> str:
|
||||
if is_code_like(text):
|
||||
return resolve_index_stock_code_for_analysis(text)
|
||||
|
||||
if text.isdigit() and len(text) == 4:
|
||||
resolved_index_code = resolve_index_stock_code_for_analysis(text)
|
||||
if resolved_index_code != canonical_stock_code(text):
|
||||
return resolved_index_code
|
||||
|
||||
if _is_obviously_invalid_analysis_input(text):
|
||||
raise _invalid_analysis_input_error()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user