Repository Analysis

hsliuping/TradingAgents-CN

基于多智能体LLM的中文金融交易框架 - TradingAgents中文增强版

14.9 Low AI signal View on GitHub
14.9
Adjusted Score
14.9
Raw Score
100%
Time Factor
2026-04-20
Last Push
27,592
Stars
Python
Language
496,941
Lines of Code
1873
Files
6778
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 132MEDIUM 104LOW 6542

Pattern Findings

6778 matches across 18 categories. Click a row to expand file-level details.

Excessive Try-Catch Wrapping3466 hits · 3380 pts
SeverityFileLineSnippet
LOWapp/worker.py50 except Exception as e:
LOWapp/worker.py76 except Exception:
LOWapp/worker.py148 except Exception as analysis_error:
LOWapp/worker.py174 except Exception as e:
LOWapp/worker.py200 except Exception as e:
LOWapp/worker.py217 except Exception as e:
LOWapp/main.py80 except Exception:
LOWapp/main.py123 except Exception as e:
LOWapp/main.py192 except Exception as e:
LOWapp/main.py207 except Exception as e:
LOWapp/main.py211 except Exception as e:
LOWapp/main.py226 except Exception as e:
LOWapp/main.py236 except Exception as e:
LOWapp/main.py251 except Exception:
LOWapp/main.py253 except Exception as e:
LOWapp/main.py267 except Exception as e:
LOWapp/main.py274 except Exception:
LOWapp/main.py552 except Exception as e:
LOWapp/main.py577 except Exception as e:
LOWapp/main.py589 except Exception as e:
LOWapp/main.py596 except Exception as e:
LOWapp/__main__.py30 except Exception:
LOWapp/__main__.py33 except Exception as e:
LOWapp/__main__.py88 except Exception as e:
LOWapp/__main__.py103except Exception as e:
LOWapp/__main__.py156 except Exception:
LOWapp/__main__.py174 except Exception as e:
LOWapp/routers/sync.py22 except Exception as e:
LOWapp/routers/tags.py41 except Exception as e:
LOWapp/routers/tags.py55 except Exception as e:
LOWapp/routers/tags.py75 except Exception as e:
LOWapp/routers/tags.py88 except Exception as e:
LOWapp/routers/news_data.py113 except Exception as e:
LOWapp/routers/news_data.py126 except Exception as e:
LOWapp/routers/news_data.py176 except Exception as e:
LOWapp/routers/news_data.py221 except Exception as e:
LOWapp/routers/news_data.py265 except Exception as e:
LOWapp/routers/news_data.py322 except Exception as e:
LOWapp/routers/news_data.py374 except Exception as e:
LOWapp/routers/news_data.py427 except Exception as e:
LOWapp/routers/news_data.py461 except Exception as e:
LOWapp/routers/news_data.py482 except Exception as e:
LOWapp/routers/news_data.py499 except Exception as e:
LOWapp/routers/news_data.py511 except Exception as e:
LOWapp/routers/stocks.py27 except Exception:
LOWapp/routers/stocks.py103 except Exception as e:
LOWapp/routers/stocks.py160 except Exception:
LOWapp/routers/stocks.py187 except Exception as e:
LOWapp/routers/stocks.py247 except Exception as e:
LOWapp/routers/stocks.py322 except Exception as e:
LOWapp/routers/stocks.py468 except Exception as e:
LOWapp/routers/stocks.py527 except Exception as e:
LOWapp/routers/stocks.py546 except Exception as e:
LOWapp/routers/stocks.py610 except Exception as e:
LOWapp/routers/stocks.py702 except Exception as e:
LOWapp/routers/stocks.py739 except Exception as e:
LOWapp/routers/stock_sync.py244 except Exception as e:
LOWapp/routers/stock_sync.py285 except Exception as e:
LOWapp/routers/stock_sync.py308 except Exception as e:
LOWapp/routers/stock_sync.py333 except Exception as e:
3406 more matches not shown…
Hyper-Verbose Identifiers1266 hits · 1272 pts
SeverityFileLineSnippet
LOWapp/routers/news_data.py503async def _execute_market_news_sync(sync_service, request: NewsSyncRequest):
LOWapp/routers/stock_sync.py25async def _sync_latest_to_market_quotes(symbol: str) -> None:
LOWapp/routers/config.py165def _sanitize_database_configs(items):
LOWapp/routers/config.py1583async def remove_datasource_from_category(
LOWapp/routers/config.py1621async def update_datasource_grouping(
LOWapp/routers/config.py1660async def update_category_datasource_order(
LOWapp/routers/config.py97def _sort_llm_configs_by_newest(items):
LOWapp/routers/config.py113def _sanitize_datasource_configs(items):
LOWapp/routers/config.py576async def init_aggregator_providers(
LOWapp/routers/config.py936async def test_saved_database_config(
LOWapp/routers/config.py1134async def update_data_source_config(
LOWapp/routers/config.py1344async def delete_data_source_config(
LOWapp/routers/config.py1545async def add_datasource_to_category(
LOWapp/routers/config.py2050async def get_provider_model_catalog(
LOWapp/routers/analysis.py985async def get_user_analysis_history(
LOWapp/routers/model_capabilities.py78async def get_default_model_configs():
LOWapp/routers/model_capabilities.py134async def get_capability_descriptions():
LOWapp/routers/database.py104async def test_database_connections(
LOWapp/routers/screening.py74def _convert_legacy_conditions_to_new_format(legacy_conditions: Dict[str, Any]) -> List[ScreeningCondition]:
LOWapp/routers/websocket_notifications.py110async def websocket_notifications_endpoint(
LOWapp/routers/websocket_notifications.py201async def websocket_task_progress_endpoint(
LOWapp/routers/websocket_notifications.py272async def send_notification_via_websocket(user_id: str, notification: dict):
LOWapp/routers/websocket_notifications.py287async def send_task_progress_via_websocket(task_id: str, progress_data: dict):
LOWapp/routers/reports.py356async def get_report_module_content(
LOWapp/routers/social_media.py69async def save_social_media_messages(request: SocialMediaBatchRequest):
LOWapp/routers/social_media.py94async def query_social_media_messages(request: SocialMediaQueryRequest):
LOWapp/routers/financial_data.py91async def get_latest_financial_data(
LOWapp/routers/financial_data.py184async def sync_single_stock_financial(
LOWapp/routers/scheduler.py58async def update_job_metadata_route(
LOWapp/routers/scheduler.py381async def get_single_job_executions(
LOWapp/routers/tushare_init.py112async def get_initialization_status(
LOWapp/routers/tushare_init.py137async def start_basic_initialization(
LOWapp/routers/tushare_init.py161async def start_full_initialization(
LOWapp/routers/tushare_init.py226async def _run_basic_initialization():
LOWapp/routers/baostock_init.py84async def start_full_initialization(
LOWapp/routers/baostock_init.py136async def start_basic_initialization(background_tasks: BackgroundTasks):
LOWapp/routers/baostock_init.py178async def get_initialization_status():
LOWapp/routers/baostock_init.py252async def _run_full_initialization_task(historical_days: int, force: bool, task_id: str):
LOWapp/routers/baostock_init.py285async def _run_basic_initialization_task(task_id: str):
LOWapp/routers/akshare_init.py146async def start_full_initialization(
LOWapp/routers/akshare_init.py260async def get_initialization_status():
LOWapp/routers/akshare_init.py326async def _run_full_initialization_background(historical_days: int, force: bool):
LOWapp/routers/akshare_init.py352async def _run_basic_sync_background(force_update: bool):
LOWapp/middleware/operation_log_middleware.py21def set_operation_log_enabled(flag: bool) -> None:
LOWapp/core/database.py214async def init_database_views_and_indexes():
LOWapp/core/database.py232async def create_stock_screening_view(db):
LOWapp/core/rate_limiter.py213def get_baostock_rate_limiter() -> BaoStockRateLimiter:
LOWapp/core/config_compat.py31 def _emit_deprecation_warning(self):
LOWapp/core/startup_validator.py186 def _validate_required_configs(self):
LOWapp/core/startup_validator.py200 def _validate_recommended_configs(self):
LOWapp/core/config_bridge.py299def _bridge_datasource_details(data_source_configs) -> int:
LOWapp/core/config_bridge.py673async def _sync_pricing_config_from_db():
LOWapp/core/unified_config.py327 async def get_data_source_configs_async(self) -> List[DataSourceConfig]:
LOWapp/core/unified_config.py442 async def get_unified_system_config(self) -> SystemConfig:
LOWapp/constants/model_capabilities.py353def get_model_capability_badge(level: int) -> Dict[str, str]:
LOWapp/utils/api_key_utils.py76def get_env_api_key_for_provider(provider_name: str) -> Optional[str]:
LOWapp/utils/api_key_utils.py97def get_env_api_key_for_datasource(ds_type: str) -> Optional[str]:
LOWapp/utils/api_key_utils.py137def should_skip_api_key_update(api_key: Optional[str]) -> bool:
LOWapp/utils/error_formatter.py199 def _generate_friendly_message(
LOWapp/utils/report_exporter.py167 def _clean_markdown_for_pandoc(self, md_content: str) -> str:
1206 more matches not shown…
Unused Imports1006 hits · 986 pts
SeverityFileLineSnippet
LOWapp/worker.py23
LOWapp/main.py40
LOWapp/routers/sync.py7
LOWapp/routers/tags.py4
LOWapp/routers/news_data.py6
LOWapp/routers/news_data.py6
LOWapp/routers/stocks.py7
LOWapp/routers/stocks.py7
LOWapp/routers/stocks.py7
LOWapp/routers/stock_sync.py6
LOWapp/routers/config.py22
LOWapp/routers/config.py88
LOWapp/routers/analysis.py17
LOWapp/routers/analysis.py20
LOWapp/routers/analysis.py20
LOWapp/routers/analysis.py20
LOWapp/routers/analysis.py20
LOWapp/routers/model_capabilities.py5
LOWapp/routers/model_capabilities.py21
LOWapp/routers/database.py6
LOWapp/routers/database.py8
LOWapp/routers/database.py15
LOWapp/routers/database.py15
LOWapp/routers/cache.py6
LOWapp/routers/cache.py7
LOWapp/routers/cache.py7
LOWapp/routers/historical_data.py7
LOWapp/routers/historical_data.py8
LOWapp/routers/screening.py8
LOWapp/routers/favorites.py11
LOWapp/routers/favorites.py11
LOWapp/routers/websocket_notifications.py9
LOWapp/routers/multi_market_stocks.py12
LOWapp/routers/multi_market_stocks.py12
LOWapp/routers/multi_market_stocks.py12
LOWapp/routers/reports.py4
LOWapp/routers/reports.py6
LOWapp/routers/reports.py8
LOWapp/routers/reports.py10
LOWapp/routers/reports.py11
LOWapp/routers/social_media.py7
LOWapp/routers/social_media.py10
LOWapp/routers/financial_data.py7
LOWapp/routers/financial_data.py306
LOWapp/routers/scheduler.py9
LOWapp/routers/scheduler.py10
LOWapp/routers/operation_logs.py6
LOWapp/routers/operation_logs.py6
LOWapp/routers/stock_data.py5
LOWapp/routers/stock_data.py11
LOWapp/routers/stock_data.py11
LOWapp/routers/stock_data.py11
LOWapp/routers/tushare_init.py7
LOWapp/routers/tushare_init.py7
LOWapp/routers/internal_messages.py7
LOWapp/routers/internal_messages.py10
LOWapp/routers/usage_statistics.py7
LOWapp/routers/usage_statistics.py11
LOWapp/routers/usage_statistics.py11
LOWapp/routers/baostock_init.py6
946 more matches not shown…
Deep Nesting780 hits · 697 pts
SeverityFileLineSnippet
LOWapp/main.py85
LOWapp/__main__.py42
LOWapp/routers/news_data.py44
LOWapp/routers/stocks.py422
LOWapp/routers/stocks.py625
LOWapp/routers/stock_sync.py123
LOWapp/routers/stock_sync.py571
LOWapp/routers/config.py113
LOWapp/routers/config.py247
LOWapp/routers/config.py639
LOWapp/routers/config.py748
LOWapp/routers/config.py903
LOWapp/routers/config.py1134
LOWapp/routers/config.py1344
LOWapp/routers/analysis.py106
LOWapp/routers/analysis.py222
LOWapp/routers/analysis.py772
LOWapp/routers/analysis.py985
LOWapp/routers/paper.py194
LOWapp/routers/screening.py74
LOWapp/routers/screening.py276
LOWapp/routers/sse.py18
LOWapp/routers/sse.py113
LOWapp/routers/multi_source_sync.py41
LOWapp/routers/multi_source_sync.py89
LOWapp/routers/multi_source_sync.py155
LOWapp/routers/multi_source_sync.py193
LOWapp/routers/system_config.py64
LOWapp/routers/reports.py429
LOWapp/routers/social_media.py266
LOWapp/routers/akshare_init.py47
LOWapp/middleware/operation_log_middleware.py177
LOWapp/core/logging_config.py66
LOWapp/core/config_bridge.py15
LOWapp/core/config_bridge.py359
LOWapp/core/config_bridge.py673
LOWapp/core/unified_config.py259
LOWapp/core/unified_config.py327
LOWapp/utils/trading_time.py133
LOWapp/utils/error_formatter.py199
LOWapp/utils/report_exporter.py284
LOWapp/scripts/normalize_provider_keys.py139
LOWapp/scripts/migrate_mongo_db.py74
LOWapp/worker/news_data_sync_service.py89
LOWapp/worker/news_data_sync_service.py183
LOWapp/worker/news_data_sync_service.py228
LOWapp/worker/news_data_sync_service.py260
LOWapp/worker/news_data_sync_service.py357
LOWapp/worker/news_data_sync_service.py433
LOWapp/worker/example_sdk_sync_service.py211
LOWapp/worker/baostock_sync_service.py117
LOWapp/worker/baostock_sync_service.py172
LOWapp/worker/baostock_sync_service.py413
LOWapp/worker/baostock_sync_service.py493
LOWapp/worker/financial_data_sync_service.py143
LOWapp/worker/tushare_sync_service.py160
LOWapp/worker/tushare_sync_service.py228
LOWapp/worker/tushare_sync_service.py517
LOWapp/worker/tushare_sync_service.py543
LOWapp/worker/tushare_sync_service.py780
720 more matches not shown…
Cross-Language Confusion (JS/TS)72 hits · 452 pts
SeverityFileLineSnippet
HIGHscripts/mongo-init.js21 print('✓ 创建应用用户成功');
HIGHscripts/mongo-init.js23 print('⚠ 用户可能已存在: ' + e.message);
HIGHscripts/mongo-init.js31print('\n创建集合...');
HIGHscripts/mongo-init.js187print('✓ 初始数据插入完成');
HIGHscripts/mongo-init.js191print('\n验证数据库初始化...');
HIGHscripts/mongo-init.js194print('✓ 集合数量: ' + collections.length);
HIGHscripts/mongo-init.js200print('✓ 索引数量: ' + indexes);
HIGHscripts/mongo-init.js203print('✓ 系统配置数量: ' + configCount);
HIGHscripts/mongo-init.js205print('\n========================================');
HIGHscripts/mongo-init.js206print('TradingAgents数据库初始化完成!');
HIGHscripts/mongo-init.js207print('========================================');
HIGHscripts/mongo-init.js208print('数据库: tradingagents');
HIGHscripts/mongo-init.js209print('用户: tradingagents');
HIGHscripts/mongo-init.js210print('密码: tradingagents123');
HIGHscripts/mongo-init.js211print('集合数: ' + collections.length);
HIGHscripts/mongo-init.js212print('索引数: ' + indexes);
HIGHscripts/mongo-init.js213print('========================================');
HIGHscripts/mongo-init.js4print('开始初始化TradingAgents数据库...');
HIGHscripts/mongo-init.js63print('✓ 集合创建完成');
HIGHscripts/mongo-init.js67print('\n创建索引...');
HIGHscripts/mongo-init.js153print('✓ 索引创建完成');
HIGHscripts/mongo-init.js157print('\n插入初始数据...');
HIGHscripts/mongo-init-debug.js4print('========================================');
HIGHscripts/mongo-init-debug.js5print('🔍 MongoDB 初始化脚本开始执行');
HIGHscripts/mongo-init-debug.js6print('========================================');
HIGHscripts/mongo-init-debug.js9print('\n📋 环境变量检查:');
HIGHscripts/mongo-init-debug.js10print('MONGO_INITDB_ROOT_USERNAME: ' + (typeof MONGO_INITDB_ROOT_USERNAME !== 'undefined' ? MONGO_INITDB_ROOT_USERNAME :
HIGHscripts/mongo-init-debug.js11print('MONGO_INITDB_ROOT_PASSWORD: ' + (typeof MONGO_INITDB_ROOT_PASSWORD !== 'undefined' ? '已设置' : '未设置'));
HIGHscripts/mongo-init-debug.js12print('MONGO_INITDB_DATABASE: ' + (typeof MONGO_INITDB_DATABASE !== 'undefined' ? MONGO_INITDB_DATABASE : '未设置'));
HIGHscripts/mongo-init-debug.js15print('\n📋 切换到 admin 数据库...');
HIGHscripts/mongo-init-debug.js17print('✅ 当前数据库: ' + db.getName());
HIGHscripts/mongo-init-debug.js20print('\n📋 检查现有用户...');
HIGHscripts/mongo-init-debug.js23 print('现有用户数量: ' + users.users.length);
HIGHscripts/mongo-init-debug.js25 print('用户列表:');
HIGHscripts/mongo-init-debug.js27 print(' - ' + user.user + ' (角色: ' + JSON.stringify(user.roles) + ')');
HIGHscripts/mongo-init-debug.js31 print('⚠️ 无法获取用户列表: ' + e.message);
HIGHscripts/mongo-init-debug.js35print('\n📋 创建 root 用户 (admin)...');
HIGHscripts/mongo-init-debug.js47 print('✅ root 用户创建成功');
HIGHscripts/mongo-init-debug.js49 print('⚠️ 用户可能已存在: ' + e.message);
HIGHscripts/mongo-init-debug.js53print('\n📋 创建应用用户 (tradingagents)...');
HIGHscripts/mongo-init-debug.js65 print('✅ 应用用户创建成功');
HIGHscripts/mongo-init-debug.js67 print('⚠️ 用户可能已存在: ' + e.message);
HIGHscripts/mongo-init-debug.js71print('\n📋 验证用户创建...');
HIGHscripts/mongo-init-debug.js74 print('当前用户数量: ' + users.users.length);
HIGHscripts/mongo-init-debug.js76 print(' ✅ ' + user.user + ' (角色: ' + JSON.stringify(user.roles) + ')');
HIGHscripts/mongo-init-debug.js79 print('❌ 无法验证用户: ' + e.message);
HIGHscripts/mongo-init-debug.js83print('\n📋 切换到应用数据库 (tradingagents)...');
HIGHscripts/mongo-init-debug.js85print('✅ 当前数据库: ' + db.getName());
HIGHscripts/mongo-init-debug.js88print('\n📋 创建测试集合...');
HIGHscripts/mongo-init-debug.js91 print('✅ 测试集合创建成功');
HIGHscripts/mongo-init-debug.js93 print('❌ 集合创建失败: ' + e.message);
HIGHscripts/mongo-init-debug.js97print('\n📋 插入测试数据...');
HIGHscripts/mongo-init-debug.js103 print('✅ 测试数据插入成功');
HIGHscripts/mongo-init-debug.js105 print('❌ 数据插入失败: ' + e.message);
HIGHscripts/mongo-init-debug.js109print('\n📋 验证数据...');
HIGHscripts/mongo-init-debug.js112 print('✅ 测试集合文档数量: ' + count);
HIGHscripts/mongo-init-debug.js114 print('❌ 数据验证失败: ' + e.message);
HIGHscripts/mongo-init-debug.js117print('\n========================================');
HIGHscripts/mongo-init-debug.js118print('✅ MongoDB 初始化脚本执行完成');
HIGHscripts/mongo-init-debug.js119print('========================================');
12 more matches not shown…
Decorative Section Separators64 hits · 228 pts
SeverityFileLineSnippet
MEDIUMapp/__main__.py11# ============================================================================
MEDIUMapp/__main__.py13# ============================================================================
MEDIUMtests/test_akshare_hk_apis.py48 # ========================================
MEDIUMtests/test_akshare_hk_apis.py50 # ========================================
MEDIUMtests/test_akshare_hk_apis.py91 # ========================================
MEDIUMtests/test_akshare_hk_apis.py93 # ========================================
MEDIUMtests/test_akshare_hk_apis.py107 # ========================================
MEDIUMtests/test_akshare_hk_apis.py109 # ========================================
MEDIUMtests/test_akshare_hk_apis.py124 # ========================================
MEDIUMtests/test_akshare_hk_apis.py126 # ========================================
MEDIUMtests/test_akshare_hk_apis.py150 # ========================================
MEDIUMtests/test_akshare_hk_apis.py152 # ========================================
MEDIUMtests/test_akshare_hk_apis.py173 # ========================================
MEDIUMtests/test_akshare_hk_apis.py175 # ========================================
MEDIUMdocs/design/configuration_management.md14# ===========================================
MEDIUMdocs/design/configuration_management.md16# ===========================================
MEDIUMdocs/configuration/config-guide.md28# ===========================================
MEDIUMdocs/configuration/config-guide.md30# ===========================================
MEDIUMdocs/configuration/quotes_ingestion_config.md52# ========================================
MEDIUMdocs/configuration/quotes_ingestion_config.md54# ========================================
MEDIUMdocs/configuration/quotes_ingestion_config.md69# ========================================
MEDIUMdocs/configuration/quotes_ingestion_config.md71# ========================================
MEDIUMdocs/guides/portable-installation-guide.md351# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md353# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md367# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md369# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md381# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md383# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md398# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md400# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md415# ============================================================================
MEDIUMdocs/guides/portable-installation-guide.md417# ============================================================================
MEDIUMdocs/guides/installation-guide.md195# ===========================================
MEDIUMdocs/guides/installation-guide.md197# ===========================================
MEDIUMdocs/guides/installation-guide.md204# ===========================================
MEDIUMdocs/guides/installation-guide.md206# ===========================================
MEDIUMdocs/guides/installation-guide.md229# ===========================================
MEDIUMdocs/guides/installation-guide.md231# ===========================================
MEDIUMdocs/guides/installation-guide.md242# ===========================================
MEDIUMdocs/guides/installation-guide.md244# ===========================================
MEDIUMdocs/guides/installation-guide.md256# ===========================================
MEDIUMdocs/guides/installation-guide.md258# ===========================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md348# =============================================================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md350# =============================================================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md366# =============================================================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md368# =============================================================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md376# =============================================================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md378# =============================================================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md395# =============================================================================
MEDIUMdocs/guides/INSTALLATION_GUIDE.md397# =============================================================================
MEDIUMscripts/test_google_sdk_basic.py31# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py33# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py61# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py63# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py93# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py95# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py127# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py129# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py163# ============================================================================
MEDIUMscripts/test_google_sdk_basic.py165# ============================================================================
4 more matches not shown…
Magic Placeholder Names31 hits · 160 pts
SeverityFileLineSnippet
HIGHapp/services/simple_analysis_service.py138 if model_api_key and model_api_key.strip() and model_api_key != "your-api-key":
HIGHapp/services/simple_analysis_service.py143 if provider_api_key and provider_api_key.strip() and provider_api_key != "your-api-key":
HIGHapp/services/simple_analysis_service.py203 if provider_api_key and provider_api_key.strip() and provider_api_key != "your-api-key":
HIGHapp/services/simple_analysis_service.py262 if provider_api_key and provider_api_key.strip() and provider_api_key != "your-api-key":
HIGHapp/services/simple_analysis_service.py309 if api_key and api_key.strip() and api_key != "your-api-key":
HIGHtests/test_dashscope_adapter_fix.py286 print(" Windows: set DASHSCOPE_API_KEY=your_api_key")
HIGHtests/test_dashscope_adapter_fix.py287 print(" Linux/Mac: export DASHSCOPE_API_KEY=your_api_key")
HIGHtests/integration/test_dashscope_integration.py44 print("💡 请设置: set DASHSCOPE_API_KEY=your_api_key")
HIGHtests/integration/test_dashscope_integration.py51 print("💡 请设置: set FINNHUB_API_KEY=your_api_key")
HIGHdocs/google-ai-base-url-support.md147 google_api_key="YOUR_API_KEY"
HIGHdocs/google-ai-base-url-support.md157 google_api_key="YOUR_API_KEY",
HIGHdocs/configuration/UNIFIED_CONFIG.md135 api_key="your-api-key",
HIGHdocs/configuration/UNIFIED_CONFIG.md170 api_key: 'your-api-key'
HIGHdocs/configuration/API_KEY_PRIORITY.md141api_key = "your-api-key-here"
HIGHdocs/configuration/dashscope-config.md229 dashscope.api_key = "your_api_key"
HIGHdocs/configuration/migration/CONFIG_MIGRATION.md177 api_key: 'your-api-key',
HIGHdocs/guides/config-management-guide.md95 "api_key": "sk-your-api-key-here",
HIGHdocs/guides/stock_data_sdk_integration_guide.md438NEW_SDK_API_KEY=your_api_key
HIGH…dingagents/dataflows/providers/examples/example_sdk.py367 provider = ExampleSDKProvider(api_key="your_api_key")
HIGH…dingagents/dataflows/providers/examples/example_sdk.py388 async with ExampleSDKProvider(api_key="your_api_key") as provider:
HIGHexamples/demo_deepseek_analysis.py38 logger.info(f" DEEPSEEK_API_KEY=your_api_key")
HIGHexamples/simple_analysis_demo.py29 logger.info(f"💡 在 .env 文件中添加: DASHSCOPE_API_KEY=your_api_key")
HIGHexamples/dashscope_examples/demo_dashscope.py38 logger.info(f" Windows: set DASHSCOPE_API_KEY=your_api_key")
HIGHexamples/dashscope_examples/demo_dashscope.py39 logger.info(f" Linux/Mac: export DASHSCOPE_API_KEY=your_api_key")
HIGHexamples/dashscope_examples/demo_dashscope.py52 logger.info(f" Windows: set FINNHUB_API_KEY=your_api_key")
HIGHexamples/dashscope_examples/demo_dashscope.py53 logger.info(f" Linux/Mac: export FINNHUB_API_KEY=your_api_key")
HIGHscripts/test_google_api_connection.py26 print("请在 .env 文件中设置:GOOGLE_API_KEY=your-api-key")
HIGHscripts/test_qianfan_raw.py214 print(" 方式1 (推荐): QIANFAN_API_KEY=your_api_key")
HIGHscripts/test_api_key_validation.py31 ("your-api-key-here", False, "占位符 - your- 前缀 + -here 后缀"),
HIGHscripts/test_google_api_with_proxy.py39 print("请在 .env 文件中设置:GOOGLE_API_KEY=your-api-key")
HIGHscripts/test_api_key_priority.py42 ("your-api-key-here", False, "占位符 (your-)"),
Cross-Language Confusion14 hits · 65 pts
SeverityFileLineSnippet
HIGHweb/app.py574 const newUrl = currentUrl.origin + currentUrl.pathname + '?' + existingParams.toString();
HIGHweb/utils/auth_manager.py82 if (!authData) return null;
HIGHweb/utils/auth_manager.py92 return null;
HIGHweb/utils/auth_manager.py103 return null;
HIGHweb/components/sidebar.py47 console.log('Loaded from localStorage:', key, value || defaultValue);
HIGHweb/components/sidebar.py48 return value || defaultValue;
HIGHscripts/check_old_mongodb_volume.py139 if (config.llm_configs && config.llm_configs.length > 0) {{
HIGHscripts/check_old_mongodb_volume.py148 if (config.data_source_configs && config.data_source_configs.length > 0) {{
HIGHscripts/fix_docker_logging.py258 print("2. 重启容器: docker-compose down && docker-compose up -d")
HIGHscripts/init_system_data.py327 logger.info("2. 启动前端服务: cd frontend && npm run dev")
HIGHscripts/fix_logging_config_error.py270 print("2. 重启容器: docker-compose down && docker-compose up -d")
HIGHscripts/verify_docker_logs.py234 print(" 2. 重启容器: docker-compose down && docker-compose up -d")
HIGHscripts/git/check_branch_overlap.py199git checkout feature/akshare-integration 2>/dev/null && git checkout -b backup/akshare-integration-$(date +%Y%m%d)
HIGHscripts/git/check_branch_overlap.py200git checkout feature/akshare-integration-clean 2>/dev/null && git checkout -b backup/akshare-integration-clean-$(date +%
Cross-File Repetition13 hits · 65 pts
SeverityFileLineSnippet
HIGHapp/worker/baostock_sync_service.py0获取最后同步日期 args: symbol: 股票代码,如果提供则返回该股票的最后日期+1天 returns: 日期字符串 (yyyy-mm-dd)
HIGHapp/worker/tushare_sync_service.py0获取最后同步日期 args: symbol: 股票代码,如果提供则返回该股票的最后日期+1天 returns: 日期字符串 (yyyy-mm-dd)
HIGHapp/worker/akshare_sync_service.py0获取最后同步日期 args: symbol: 股票代码,如果提供则返回该股票的最后日期+1天 returns: 日期字符串 (yyyy-mm-dd)
HIGHapp/services/news_data_service.py0转换 mongodb objectid 为字符串,避免 json 序列化错误 args: data: 单个文档或文档列表 returns: 转换后的数据
HIGHapp/services/internal_message_service.py0转换 mongodb objectid 为字符串,避免 json 序列化错误 args: data: 单个文档或文档列表 returns: 转换后的数据
HIGHdocs/fixes/mongodb_objectid_serialization_fix.md0转换 mongodb objectid 为字符串,避免 json 序列化错误 args: data: 单个文档或文档列表 returns: 转换后的数据
HIGHtests/test_llm_tool_calling_comparison.py0# 000002 万科a 股票数据分析 ## 📊 实时行情 - 股票名称: 万科a - 当前价格: ¥6.56 - 涨跌幅: 0.61% - 成交量: 934,783手 ## 📈 技术指标 - 10日ema: ¥6.45 - 50日sma:
HIGHtests/test_llm_tool_calling_comparison.py0# 000002 万科a 股票数据分析 ## 📊 实时行情 - 股票名称: 万科a - 当前价格: ¥6.56 - 涨跌幅: 0.61% - 成交量: 934,783手 ## 📈 技术指标 - 10日ema: ¥6.45 - 50日sma:
HIGHtests/test_complete_tool_workflow.py0# 000002 万科a 股票数据分析 ## 📊 实时行情 - 股票名称: 万科a - 当前价格: ¥6.56 - 涨跌幅: 0.61% - 成交量: 934,783手 ## 📈 技术指标 - 10日ema: ¥6.45 - 50日sma:
HIGHtests/test_complete_tool_workflow.py0# 000002 万科a 股票数据分析 ## 📊 实时行情 - 股票名称: 万科a - 当前价格: ¥6.56 - 涨跌幅: 0.61% - 成交量: 934,783手 ## 📈 技术指标 - 10日ema: ¥6.45 - 50日sma:
HIGHdocs/fixes/analyst_infinite_loop_fix.md0determine if fundamentals analysis should continue.
HIGHdocs/fixes/analyst_infinite_loop_fix.md0determine if fundamentals analysis should continue.
HIGHdocs/fixes/analyst_infinite_loop_fix.md0determine if fundamentals analysis should continue.
Verbosity Indicators20 hits · 37 pts
SeverityFileLineSnippet
LOWapp/routers/stock_sync.py356 # Step 1: 获取股票基础信息
LOWapp/routers/stock_sync.py378 # Step 2: 获取最新交易日和财务指标
LOWapp/routers/stock_sync.py383 # Step 3: 构建文档(参考 basics_sync_service 的逻辑)
LOWapp/routers/stock_sync.py478 # Step 4: 更新数据库
LOWapp/services/basics_sync_service.py194 # Step 0: Check if Tushare is enabled
LOWapp/services/basics_sync_service.py206 # Step 1: Fetch stock basic list from Tushare (blocking -> thread)
LOWapp/services/basics_sync_service.py211 # Step 2: Determine latest trade_date and fetch daily_basic for financial metrics (blocking -> thread)
LOWapp/services/basics_sync_service.py219 # Step 3: Upsert into MongoDB (batched bulk writes)
LOWapp/services/multi_source_basics_sync_service.py164 # Step 1: 获取数据源管理器
LOWapp/services/multi_source_basics_sync_service.py178 # Step 2: 尝试从数据源获取股票列表
LOWapp/services/multi_source_basics_sync_service.py188 # Step 3: 获取最新交易日期和财务数据
LOWapp/services/multi_source_basics_sync_service.py207 # Step 5: 处理和更新数据(分批处理)
LOWapp/services/multi_source_basics_sync_service.py308 # Step 7: 更新统计信息
LOWcli/main.py560 # Step 1: Market selection
LOWcli/main.py570 # Step 2: Ticker symbol
LOWcli/main.py580 # Step 3: Analysis date
LOWcli/main.py603 # Step 5: Research depth
LOWcli/main.py612 # Step 6: LLM Provider
LOWcli/main.py621 # Step 7: Thinking agents
LOWcli/main.py591 # Step 4: Select analysts
Over-Commented Block26 hits · 25 pts
SeverityFileLineSnippet
LOWdocker-compose.hub.nginx.arm.yml1version: '3.8'
LOWdocker-compose.hub.nginx.yml1version: '3.8'
LOWrequirements-lock.txt1# ==================== 锁定版本依赖文件 ====================
LOWapp/routers/stock_sync.py281 if hist_result.get("success_count", 0) > 0:
LOWapp/routers/analysis.py921# user: dict = Depends(get_current_user),
LOWapp/worker/tushare_sync_service.py401 # Dict[symbol, quote_data]
LOWdocs/design/v1.0.1/prompt_template_usage_examples.md61 print("---")
LOWdocs/design/v1.0.1/prompt_template_usage_examples.md121print(rendered['system_prompt'])
LOWdocs/releases/upgrade-to-v0.1.13-preview.md201### 问题 2: Google AI包导入失败
LOWdocs/configuration/docker-config.md221
LOWdocs/configuration/quotes_ingestion_config.md61# - 付费用户建议: 5-60 秒
LOW…/integration/providers/tushare/tdx_removal_complete.md121#### 1. 检查环境变量
LOWdocs/features/aggregator/CHANGELOG_AGGREGATOR.md201### 使用聚合渠道模型
LOWdocs/blog/2025-10-24-realtime-quotes-optimization.md401# 📈 实时行情入库服务
LOWdocs/guides/report-export-guide.md61## 📊 使用指南
LOWdocs/guides/report-export-guide.md81# 1. 滚动到页面底部
LOW…cs/guides/tushare_unified/data_initialization_guide.md61
LOWdocs/deployment/SIMPLE_DEPLOYMENT_GUIDE.md41
LOWdocs/deployment/demo/deploy_demo_with_docker.md621# 找到 DASHSCOPE_API_KEY= 这一行
LOWdocs/deployment/demo/deploy_demo_with_docker.md661cd ~/tradingagents-demo
LOWdocs/deployment/demo/deploy_demo_with_docker.md681# 将等号后面改为你的 API Key,例如:DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxx
LOWdocs/deployment/demo/deploy_demo_with_docker.md721# 3. 下载环境配置文件
LOWtradingagents/config/runtime_settings.py41 # 临时解决方案:完全禁用动态配置获取,避免事件循环冲突
LOWtradingagents/config/runtime_settings.py61 # # 第三次检查:在调用asyncio.run之前再次确认
LOWscripts/smart_start.sh1#!/bin/bash
LOWscripts/deploy_demo.sh1#!/bin/bash
Self-Referential Comments4 hits · 14 pts
SeverityFileLineSnippet
MEDIUMmain.py9# Create a custom config
MEDIUMapp/worker.py106 # Define a thread-safe callback to publish progress from worker thread
MEDIUMcli/main.py552 # Create a boxed questionnaire for each step
MEDIUMcli/main.py152# Create a deque to store recent messages with a maximum length
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippet
HIGHdocs/design/v1.0.1/prompt_template_technical_spec.md25 加载指定的模版 Args: analyst_type: 分析师类型 (fundamentals/market/news/social) te
HIGH…gagents/dataflows/providers/us/alpha_vantage_common.py167 发起 Alpha Vantage API 请求 Args: function: API 函数名(如 NEWS_SENTIMENT, OVERVIEW 等) params: 请求参数
Redundant / Tautological Comments6 hits · 9 pts
SeverityFileLineSnippet
LOWapp/routers/sse.py141 # Check if batch belongs to user
LOWtests/config/test_logging_json.py20 # Set CWD to temp
LOWtradingagents/dataflows/interface.py380 # Check if there are any available reports; if not, return a notification
LOWtradingagents/dataflows/interface.py427 # Check if there are any available reports; if not, return a notification
LOWtradingagents/dataflows/interface.py474 # Check if there are any available reports; if not, return a notification
LOWtradingagents/dataflows/interface.py877 # Check if data is empty
Fake / Example Data5 hits · 5 pts
SeverityFileLineSnippet
LOWfrontend/src/views/Settings/index.vue536 email: authStore.user?.email || 'admin@example.com',
LOWfrontend/src/views/Settings/index.vue587 generalSettings.value.email = newUser.email || 'admin@example.com'
LOWdocs/security/auth_system_improvement.md79 "email": "user@example.com",
LOWdocs/blog/green-version-backup-restore-upgrade.md1174 Send-MailMessage -To "admin@example.com" `
LOWdocs/deployment/database/export-sanitization-guide.md117 "email": "admin@example.com",
Dead Code1 hit · 2 pts
SeverityFileLineSnippet
MEDIUM…gagents/dataflows/providers/us/alpha_vantage_common.py140
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWtradingagents/agents/utils/memory.py659 # Example usage
AI Slop Vocabulary1 hit · 1 pts
SeverityFileLineSnippet
MEDIUMtradingagents/dataflows/optimized_china_data.py568 else: # detailed, comprehensive