refactor(stock): Phase 1 리뷰 반영 (public get_krx_tickers·타입·limit명명·테스트)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 21:45:19 +09:00
parent 0ef7d414b7
commit 62169ad33f
4 changed files with 76 additions and 14 deletions

View File

@@ -8,13 +8,8 @@ from . import price_fetcher
def _krx_tickers() -> set:
"""krx_master에 존재하는 ticker 집합 (KRX 판별용)."""
with db._conn() as conn:
try:
rows = conn.execute("SELECT ticker FROM krx_master").fetchall()
except Exception:
return set()
return {r["ticker"] for r in rows}
"""krx_master ticker 집합 (KRX 판별용)."""
return db.get_krx_tickers()
def get_holdings() -> list[dict]: