缠中说禅技术分析工具;缠论;股票;期货;Quant;量化交易
This report presents the forensic synthetic code analysis of waditu/czsc, a Rust project with 5,707 GitHub stars. SynthScan v2.0 examined 83,096 lines of code across 583 source files, recording 946 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 13.1 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 946 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 26 | def test_freqs_sorted_unknown_freq_to_tail(): | CODE |
| LOW | tests/test_lightweight_plotting.py | 56 | def _shanghai_naive_to_utc_epoch(dt: datetime) -> int: | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 82 | def test_naive_datetime_uses_fixed_utc_epoch_across_host_timezones(self): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 91 | def test_aware_datetime_keeps_its_own_timezone_semantics(self): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 97 | def test_candle_count_equals_bars_raw(self, czsc_30m: CZSC): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 102 | def test_fx_line_connects_all_fractals(self, czsc_30m: CZSC): | CODE |
| LOW | tests/test_lightweight_plotting.py | 127 | def test_sma_length_and_nan_head(self, czsc_30m: CZSC): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 146 | def test_macd_three_series_aligned(self, czsc_30m: CZSC): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 154 | def test_time_strictly_monotonic(self, czsc_30m: CZSC): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 161 | def test_tail_bars_truncates_all_series(self, czsc_30m: CZSC): | CODE |
| LOW | tests/test_lightweight_plotting.py | 184 | def test_panes_freq_order_large_to_small(self, trader_multi: CzscTrader): | CODE |
| LOW | tests/test_lightweight_plotting.py | 189 | def test_each_pane_has_three_series(self, trader_multi: CzscTrader): | CODE |
| LOW | tests/test_lightweight_plotting.py | 242 | def test_no_chinese_fx_labels(self, czsc_30m: CZSC): | CODE |
| LOW | tests/test_lightweight_plotting.py | 253 | def test_multi_freq_renders_tabs(self, trader_multi: CzscTrader): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 265 | def test_plot_czsc_returns_html_string_when_path_is_none(self, czsc_30m: CZSC): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 270 | def test_plot_czsc_writes_file(self, tmp_path, czsc_30m: CZSC): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 277 | def test_plot_czsc_trader_writes_multi_panes(self, tmp_path, trader_multi: CzscTrader): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 286 | def test_plot_czsc_unknown_output_raises(self, czsc_30m: CZSC): | CODE |
| LOW⚡ | tests/test_lightweight_plotting.py | 290 | def test_plot_czsc_trader_rejects_bad_object(self): | CODE |
| LOW | tests/conftest.py | 19 | def pytest_collection_modifyitems(config, items): | CODE |
| LOW | tests/test_envs.py | 40 | def test_legacy_helper_removed(self, name: str) -> None: | CODE |
| LOW | tests/test_envs.py | 51 | def test_env_helper_still_exists(self) -> None: | CODE |
| LOW | tests/test_weights_convert.py | 171 | def test_multi_day_complex_scenario(): | CODE |
| LOW | tests/test_utils_refactored.py | 23 | def test_plotting_weight_module_removed(): | CODE |
| LOW | tests/test_utils_refactored.py | 135 | def test_analysis_stats_module_removed(): | CODE |
| LOW | tests/test_utils_refactored.py | 158 | def test_analysis_corr_imports(): | CODE |
| LOW | tests/test_utils_refactored.py | 169 | def test_backward_compatibility(): | CODE |
| LOW | tests/test_kline_quality.py | 16 | def test_check_kline_quality_structure(): | CODE |
| LOW⚡ | tests/test_auto_czsc_quant.py | 50 | def test_load_valid_candidates_accepts_position_dict() -> None: | CODE |
| LOW⚡ | tests/test_auto_czsc_quant.py | 58 | def test_load_valid_candidates_rejects_bad_rows() -> None: | CODE |
| LOW⚡ | tests/test_auto_czsc_quant.py | 68 | def test_run_experiment_with_mock_data(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_auto_czsc_quant.py | 100 | def test_load_feather_bars_standard_ohlcv(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_auto_czsc_quant.py | 120 | def test_parse_candidate_text_accepts_jsonl_and_fences() -> None: | CODE |
| LOW | tests/test_trade_utils_extended.py | 78 | def test_missing_columns_raises(self): | CODE |
| LOW | tests/test_trade_utils_extended.py | 96 | def test_invalid_price_col_raises(self): | CODE |
| LOW | tests/test_trade_utils_extended.py | 127 | def test_direction_multiplication(self): | CODE |
| LOW | tests/test_trade_utils_extended.py | 173 | def test_invalid_hold_period_raises(self, sample_df): | CODE |
| LOW | tests/test_warning_capture.py | 15 | def test_capture_warnings_no_warning(): | CODE |
| LOW | tests/test_warning_capture.py | 28 | def test_capture_warnings_with_warning(): | CODE |
| LOW | tests/test_warning_capture.py | 43 | def test_capture_warnings_multiple_warnings(): | CODE |
| LOW | tests/test_warning_capture.py | 62 | def test_capture_warnings_with_exception(): | CODE |
| LOW | tests/test_warning_capture.py | 80 | def test_execute_with_warning_capture_no_warning(): | CODE |
| LOW | tests/test_warning_capture.py | 92 | def test_execute_with_warning_capture_with_warning(): | CODE |
| LOW | tests/test_warning_capture.py | 106 | def test_execute_with_warning_capture_with_args(): | CODE |
| LOW | tests/test_warning_capture.py | 120 | def test_execute_with_warning_capture_with_kwargs(): | CODE |
| LOW | tests/test_warning_capture.py | 134 | def test_execute_with_warning_capture_return_as_string(): | CODE |
| LOW | tests/test_warning_capture.py | 150 | def test_execute_with_warning_capture_no_warning_string(): | CODE |
| LOW | tests/test_warning_capture.py | 162 | def test_execute_with_warning_capture_exception(): | CODE |
| LOW | tests/test_warning_capture.py | 173 | def test_warning_capture_context_manager_isolation(): | CODE |
| LOW | tests/test_warning_capture.py | 198 | def test_execute_with_warning_capture_drop_duplicates_true(): | CODE |
| LOW | tests/test_warning_capture.py | 223 | def test_execute_with_warning_capture_drop_duplicates_false(): | CODE |
| LOW | tests/test_warning_capture.py | 231 | def emit_two_distinct_warnings(): | CODE |
| LOW | tests/test_warning_capture.py | 245 | def test_execute_with_warning_capture_drop_duplicates_order(): | CODE |
| LOW | tests/test_warning_capture.py | 269 | def test_execute_with_warning_capture_drop_duplicates_with_string_return(): | CODE |
| LOW | tests/test_warning_capture.py | 302 | def test_execute_with_warning_capture_no_warnings_drop_duplicates(): | CODE |
| LOW | tests/test_warning_capture.py | 321 | def test_drop_duplicates_with_real_scenario(): | CODE |
| LOW | tests/test_warning_capture.py | 325 | def process_data_with_warnings(): | CODE |
| LOW | tests/test_utils_cache.py | 125 | def test_disk_cache_dataframe(): | CODE |
| LOW | tests/test_utils_cache.py | 212 | def test_disk_cache_decorator(): | CODE |
| LOW | tests/test_utils_cache.py | 347 | def test_disk_cache_with_custom_ttl(): | CODE |
| 175 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/czsc-ta/src/lib.rs | 1 | //! czsc-ta — technical analysis operators. | COMMENT |
| LOW | crates/czsc-ta/src/python.rs | 241 | COMMENT | |
| LOW | crates/czsc-ta/src/mixed/chip_dist.rs | 1 | use ordered_float::OrderedFloat; | COMMENT |
| LOW | crates/czsc-ta/src/mixed/chip_dist.rs | 21 | /// arr2 = df[columns].to_numpy(dtype=np.float64) | COMMENT |
| LOW | crates/czsc-utils/src/monotonicity.rs | 1 | //! Spearman 单调性系数(对齐 `scipy.stats.spearmanr` 的 Spearman 相关)。 | COMMENT |
| LOW | crates/czsc-utils/src/bar_generator.rs | 141 | /// | COMMENT |
| LOW | crates/czsc-utils/src/bar_generator.rs | 201 | /// # 函数计算逻辑 | COMMENT |
| LOW | crates/czsc-utils/src/bar_generator.rs | 321 | /// 获取所属品种 | COMMENT |
| LOW | crates/czsc-utils/src/bar_generator.rs | 341 | /// 5. 维护数据量: | COMMENT |
| LOW | crates/czsc-utils/src/resample.rs | 1 | //! 批量 K 线重采样:等价于历史 Python `czsc.resample_bars`。 | COMMENT |
| LOW | crates/czsc-utils/src/resample.rs | 21 | //! | COMMENT |
| LOW | crates/czsc-utils/src/freq_data.rs | 121 | } | COMMENT |
| LOW | crates/czsc-utils/src/freq_data.rs | 141 | // // 遍历所有包含 "分钟" 的列名 | COMMENT |
| LOW | crates/czsc-utils/src/freq_data.rs | 381 | // #[test] | COMMENT |
| LOW | crates/czsc-utils/src/python/mod.rs | 21 | /// `czsc.freq_end_time(dt, freq, market=Market.Default)` → datetime。 | COMMENT |
| LOW | crates/czsc-signal-macros/tests/test_export.rs | 1 | //! Phase E.last — smoke test:czsc-signal-macros 能编译,且测试二进制 | COMMENT |
| LOW | crates/czsc-signals/src/kcatr.rs | 1 | use crate::params::ParamView; | COMMENT |
| LOW | crates/czsc-signals/src/clv.rs | 1 | use crate::params::ParamView; | COMMENT |
| LOW | crates/czsc-signals/src/ntmdk.rs | 1 | use crate::params::ParamView; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 81 | /// tas_ma_base_V221101:单均线多空与方向信号 | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 141 | } | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 201 | COMMENT | |
| LOW | crates/czsc-signals/src/tas.rs | 281 | } | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 361 | make_kline_signal_v1(&k1, &k2, k3, v1) | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 481 | /// | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 541 | let k3 = "BS辅助V221028"; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 681 | /// 参数模板:`"{freq}_D{di}N{n}#{ma_type}#{timeperiod}_BS1辅助V230217"` | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 781 | v1 = "一卖"; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 861 | && close_last < sma[n - 1] | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 881 | /// 3. 二卖条件与上面对称; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 981 | /// 信号逻辑: | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1041 | COMMENT | |
| LOW | crates/czsc-signals/src/tas.rs | 1101 | COMMENT | |
| LOW | crates/czsc-signals/src/tas.rs | 1301 | if max_count > sc && sc >= min_count { | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1361 | "看多" | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1441 | /// 4. 最近 20 根中,`ret > 1.0 * ret_std` 达到 16 次判 `扩散`(覆盖前者)。 | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1541 | /// 参数模板:`"{freq}_DIF分层W{w}T{t}_完全分类V241010"` | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1741 | v2 = format!("0轴上死叉第{}次", sc); | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1821 | } else if j == 0 && sc >= s { | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1901 | /// 2. 最新收盘价在上轨上方,且窗口内曾有收盘价在上轨下方,判 `看多`; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 1961 | make_kline_signal_v1(&k1, &k2, k3, v1) | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2041 | /// 1. 固定计算 `CCI(14)`; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2101 | COMMENT | |
| LOW | crates/czsc-signals/src/tas.rs | 2181 | } | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2261 | /// tas_atr_V230630:ATR 波动分层信号 | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2321 | /// 参数模板:`"{freq}_D{di}MACD{fastperiod}#{slowperiod}#{signalperiod}MO{max_overlap}#{key}_BS辅助V230320"` | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2401 | return make_kline_signal_v1(&k1, &k2, k3, v1); | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2501 | /// 3. 若 `diffs` 全部大于0,且 `diffs[-1]` 靠近零轴,同时 `max(diffs)` 显著高于均值+标准差,判 `买点`; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2561 | COMMENT | |
| LOW | crates/czsc-signals/src/tas.rs | 2641 | && last < delta | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2761 | } | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2841 | } | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 2921 | make_kline_signal_v1(&k1, &k2, k3, v1) | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 3021 | /// 参数模板:`"{freq}_MACD双分型背驰_BS辅助V230803"` | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 3221 | /// 2. 按等宽区间切分为 `n` 层; | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 3261 | .map(|q| format!("第{}层", q)) | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 3321 | "多头远离".to_string() | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 3481 | COMMENT | |
| LOW | crates/czsc-signals/src/tas.rs | 3701 | /// 3. 按跨零关系判定 `空翻多/多翻空`。 | COMMENT |
| LOW | crates/czsc-signals/src/tas.rs | 3761 | COMMENT | |
| 211 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_lightweight_plotting.py | 12 | CODE | |
| LOW | tests/test_envs.py | 25 | CODE | |
| LOW | tests/test_auto_czsc_quant.py | 1 | CODE | |
| LOW | tests/test_lightweight_signals.py | 6 | CODE | |
| LOW | tests/test_lightweight_signals.py | 9 | CODE | |
| LOW | tests/test_lightweight_signals.py | 12 | CODE | |
| LOW | tests/smoke/test_install.py | 22 | CODE | |
| LOW | tests/unit/test_strategy_save_load_parity.py | 18 | CODE | |
| LOW | tests/unit/test_resample_bars.py | 22 | CODE | |
| LOW | tests/unit/test_core_parity.py | 23 | CODE | |
| LOW | tests/unit/test_structure_analysis_api.py | 1 | CODE | |
| LOW | tests/unit/test_pickle.py | 24 | CODE | |
| LOW | tests/unit/test_native_enum_ergonomics.py | 18 | CODE | |
| LOW | tests/unit/test_monotonicity_parity.py | 13 | CODE | |
| LOW | tests/unit/test_trading_time.py | 23 | CODE | |
| LOW | tests/unit/test_strategy_unique_signals_parity.py | 17 | CODE | |
| LOW | tests/unit/test_hot_start_snapshot.py | 16 | CODE | |
| LOW | tests/compat/test_utils_stub_in_sync.py | 20 | CODE | |
| LOW | tests/compat/test_drop_secondary_api.py | 25 | CODE | |
| LOW | tests/compat/test_api_no_streamlit.py | 22 | CODE | |
| LOW | tests/compat/test_public_api.py | 19 | CODE | |
| LOW | tests/integration/test_weight_backtest.py | 20 | CODE | |
| LOW | …/czsc-write-signal-function/scripts/new_signal_stub.py | 4 | CODE | |
| LOW | docs/examples/17_perf_benchmark.py | 17 | CODE | |
| LOW | docs/examples/01_quick_start.py | 16 | CODE | |
| LOW | docs/examples/18_tushare_daily_event_universe.py | 34 | CODE | |
| LOW | docs/examples/07_strategy_backtest.py | 21 | CODE | |
| LOW | docs/examples/14_tushare_event_backtest.py | 20 | CODE | |
| LOW | docs/examples/15_lightweight_signals_html.py | 14 | CODE | |
| LOW | docs/examples/05_signals.py | 22 | CODE | |
| LOW | docs/examples/08_weight_backtest.py | 23 | CODE | |
| LOW | docs/examples/04_bar_generator.py | 18 | CODE | |
| LOW | docs/examples/13_event_weight_backtest.py | 23 | CODE | |
| LOW | docs/examples/06_event_position.py | 23 | CODE | |
| LOW | docs/examples/06_event_position.py | 25 | CODE | |
| LOW | docs/examples/02_chan_structures.py | 15 | CODE | |
| LOW | docs/examples/13_lightweight_charts_html.py | 18 | CODE | |
| LOW | scripts/dump_signal_details.py | 14 | CODE | |
| LOW | scripts/dump_signal_catalog.py | 11 | CODE | |
| LOW | scripts/sector_purity_analysis.py | 38 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/signals.py | 8 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/runner.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/journal.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/html_report.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/__init__.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/__init__.py | 4 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/__init__.py | 4 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/llm.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/validate.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/cli.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/goal_prompt.py | 8 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/backtest.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/data.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/schema.py | 3 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/scorer.py | 3 | CODE | |
| LOW | czsc/envs.py | 13 | CODE | |
| LOW | czsc/_runtime_adapters.py | 26 | CODE | |
| LOW | czsc/models.py | 14 | CODE | |
| LOW | czsc/strategies.py | 23 | CODE | |
| LOW | czsc/research.py | 16 | CODE | |
| 192 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/czsc/src/lib.rs | 35 | // ── 子模块命名空间 ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/czsc/src/lib.rs | 67 | // ── 顶层 re-export:常用类型直接挂在 czsc::* ──────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 75 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 77 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 91 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 93 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 155 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 157 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 241 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_resample_bars.py | 243 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …skills/signal-functions/scripts/extract_signal_docs.py | 15 | # ── 文档块解析 ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …skills/signal-functions/scripts/extract_signal_docs.py | 140 | # ── Markdown 生成 ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …skills/signal-functions/scripts/extract_signal_docs.py | 225 | # ── 主流程 ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 72 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 74 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 182 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 184 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 321 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 323 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 460 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/sector_purity_analysis.py | 462 | # ============================================================================ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 39 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 47 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 118 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 120 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 150 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 166 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 213 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 215 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 246 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 252 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 346 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/python-publish.yml | 348 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/rust-publish.yml | 124 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | .github/workflows/rust-publish.yml | 137 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | .github/workflows/rust-publish.yml | 145 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | .github/workflows/rust-publish.yml | 149 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/code-quality.yml | 15 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/code-quality.yml | 24 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/code-quality.yml | 68 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/code-quality.yml | 82 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/code-quality.yml | 120 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | .github/workflows/code-quality.yml | 124 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | czsc/utils/optimize.py | 47 | # ---------------------------------------------------------------------------- | COMMENT |
| MEDIUM | czsc/utils/optimize.py | 49 | # ---------------------------------------------------------------------------- | COMMENT |
| MEDIUM | czsc/utils/__init__.py | 25 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | czsc/utils/__init__.py | 27 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_lightweight_signals.py | 521 | assert "trio.push(cSig)" in html | CODE |
| HIGH | tests/test_lightweight_signals.py | 510 | """cSig 通过 trio.push(cSig) 进入 trio,由 trio.forEach 统一同步—— | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 268 | var crosshairTime = null; // 最近一次 hover 的 unix 秒;用于跨 tab 联动 | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 269 | var dashedLineStyle = LightweightCharts && LightweightCharts.LineStyle | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 274 | var w = container.clientWidth || (container.parentElement && container.parentElement.clientWidth) || 800; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 275 | var h = container.clientHeight || 200; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 311 | function fmt(v) { return (v == null) ? '—' : Number(v).toFixed(2); } | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 315 | if (v == null) return '—'; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 324 | var pct = prev && prev.close ? (change / prev.close * 100) : 0; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 330 | var macdCls = (macd && macd.macd != null) ? clsOf(macd.macd) : ''; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 330 | var macdCls = (macd && macd.macd != null) ? clsOf(macd.macd) : ''; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 331 | var diffCls = (macd && macd.diff != null) ? clsOf(macd.diff) : ''; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 331 | var diffCls = (macd && macd.diff != null) ? clsOf(macd.diff) : ''; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 453 | var sma5 = (freq.main.sma5 && freq.main.sma5.length) | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 454 | ? cMain.addLineSeries(Object.assign({ color: theme.sma5 }, smaCommon)) : null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 456 | var sma20 = (freq.main.sma20 && freq.main.sma20.length) | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 457 | ? cMain.addLineSeries(Object.assign({ color: theme.sma20 }, smaCommon)) : null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 459 | var fx = (freq.main.fx_line && freq.main.fx_line.length) | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 460 | ? cMain.addLineSeries(Object.assign({ color: theme.fx_dashed, lineStyle: dashedLineStyle }, smaCommon)) : null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 462 | var bi = (freq.main.bi_line && freq.main.bi_line.length) | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 463 | ? cMain.addLineSeries(Object.assign({ color: theme.bi, lineWidth: 2 }, { priceLineVisible: false, lastValueVisib | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 504 | while (ptrByKey[s.key] < ms.length && ms[ptrByKey[s.key]].time <= c.time) { | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 510 | snapshot.push({ key: s.key, v1: m.v1, value: m.value, color: m.color, direction: m.direction }); | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 515 | var highlightedKey = null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 654 | trio.push(cSig); | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 655 | trioEls.push(sigEl); | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 658 | primarySeries.push(sigRowSeriesByKey[firstRowKey]); | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 668 | if (!r || lockTime) return; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 697 | if (param && param.time != null) { | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 697 | if (param && param.time != null) { | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 700 | if (!lockCh && param && param.time) { | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 714 | var prev = entry.idx > 0 ? candleByTime[orderedCandles[entry.idx - 1].time] : null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 716 | var m = macdByTime[param.time] || null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 722 | tipEl.innerHTML = tooltipHTML(c, prev ? prev.ohlc : null, m, sigs); | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 724 | var px = param.point ? param.point.x : null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 725 | var py = param.point ? param.point.y : null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 726 | if (px == null || py == null || i !== 0) { | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 735 | var hovered = null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 736 | if (param && param.hoveredSeries) { | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 889 | if (crosshairTime == null) return; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 893 | var nearest = null; | STRING |
| HIGH⚡ | czsc/utils/plotting/lightweight/_html_renderer.py | 900 | if (nearest == null) return; | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 360 | if (signals && signals.length) { | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 379 | var w = tooltipEl.offsetWidth || 220, h = tooltipEl.offsetHeight || 200; | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 399 | var v = (b.value == null) ? 0 : Number(b.value); | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 485 | signalMarkersAll.push(entry); | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 530 | var isHi = (highlightedKey !== null && m.__key === highlightedKey); | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 531 | var isDim = (highlightedKey !== null && m.__key !== highlightedKey); | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 633 | var isHi = (highlightedKey !== null && key === highlightedKey); | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 634 | var isDim = (highlightedKey !== null && key !== highlightedKey); | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 762 | groups.push({ | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 772 | meta.insertBefore(divider, meta.querySelector('.pane-meta__hint') || null); | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 797 | highlightedKey = null; | STRING |
| HIGH | czsc/utils/plotting/lightweight/_html_renderer.py | 802 | meta.insertBefore(chip, meta.querySelector('.pane-meta__hint') || null); | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/test_core_parity.py | 56 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | tests/unit/test_pickle.py | 47 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | tests/unit/test_pickle.py | 54 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | tests/unit/test_pickle.py | 90 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | tests/unit/test_pickle.py | 124 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | tests/unit/test_trading_time.py | 37 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW⚡ | tests/compat/test_drop_secondary_api.py | 122 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | tests/compat/test_public_api.py | 45 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | tests/integration/test_weight_backtest.py | 35 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | docs/examples/18_tushare_daily_event_universe.py | 246 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | docs/superpowers/plans/2026-06-02-czsc-cli.md | 311 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/sector_purity_analysis.py | 129 | except Exception: # noqa: BLE001 | CODE |
| LOW | scripts/sector_purity_analysis.py | 164 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/signals.py | 27 | except Exception: # noqa: BLE001 - 注册表不可用时降级为空。 | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/signals.py | 103 | except Exception: # noqa: BLE001 | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/runner.py | 166 | except Exception as curve_exc: # noqa: BLE001 | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/runner.py | 169 | except Exception as exc: # noqa: BLE001 - experiment runners must record candidate failures. | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/validate.py | 115 | except Exception as load_exc: # noqa: BLE001 - validation should report load failures. | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/validate.py | 118 | except Exception as json_exc: # noqa: BLE001 | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/validate.py | 164 | except Exception: # noqa: BLE001 | CODE |
| LOW | scripts/auto-czsc-quant/auto_quant/goal_prompt.py | 67 | except Exception: # noqa: BLE001 | CODE |
| LOW | czsc/connectors/ts_connector.py | 91 | except Exception as e: | CODE |
| LOW | czsc/utils/warning_capture.py | 103 | except Exception as e: | CODE |
| LOW | czsc/utils/data/validators.py | 102 | except Exception as e: | CODE |
| LOW⚡ | czsc/utils/data/client.py | 109 | except Exception as e: | CODE |
| LOW⚡ | czsc/utils/data/client.py | 118 | except Exception as e: | CODE |
| LOW | czsc/utils/data/client.py | 153 | except Exception as e: | CODE |
| LOW | czsc/utils/data/client.py | 180 | except Exception as e: | CODE |
| LOW | czsc/utils/data/client.py | 200 | except Exception as e: | CODE |
| LOW | czsc/utils/data/client.py | 213 | except Exception as e: | CODE |
| LOW | czsc/utils/data/client.py | 232 | except Exception as e: | CODE |
| LOW | czsc/cli/_io.py | 97 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | czsc/fsa/__init__.py | 57 | except Exception as e: | CODE |
| LOW | czsc/fsa/__init__.py | 90 | except Exception as e: | CODE |
| LOW | czsc/fsa/__init__.py | 164 | except Exception as e: | CODE |
| LOW | czsc/fsa/__init__.py | 200 | except Exception as e: | CODE |
| LOW | czsc/fsa/push_strategy_latest.py | 81 | except Exception: | CODE |
| LOW | czsc/fsa/push_strategy_latest.py | 377 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/compat/test_utils_stub_in_sync.py | 31 | CODE | |
| LOW | …skills/signal-functions/scripts/extract_signal_docs.py | 26 | CODE | |
| LOW | scripts/dump_signal_details.py | 93 | CODE | |
| LOW | scripts/dump_signal_details.py | 203 | CODE | |
| LOW | scripts/dump_signal_catalog.py | 70 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/validate.py | 29 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/validate.py | 40 | CODE | |
| LOW | scripts/auto-czsc-quant/auto_quant/goal_prompt.py | 47 | CODE | |
| LOW | czsc/utils/kline_quality.py | 28 | CODE | |
| LOW | czsc/utils/plotting/lightweight/_signals.py | 105 | CODE | |
| LOW | czsc/utils/plotting/lightweight/__init__.py | 127 | CODE | |
| LOW | czsc/utils/data/client.py | 100 | CODE | |
| LOW | czsc/utils/data/client.py | 121 | CODE | |
| LOW | czsc/utils/data/client.py | 219 | CODE | |
| LOW | czsc/utils/data/cache.py | 29 | CODE | |
| LOW | czsc/utils/data/cache.py | 81 | CODE | |
| LOW | czsc/utils/data/cache.py | 116 | CODE | |
| LOW | czsc/cli/_io.py | 46 | CODE | |
| LOW | czsc/fsa/__init__.py | 131 | CODE | |
| LOW | czsc/fsa/push_strategy_latest.py | 157 | CODE | |
| LOW | czsc/fsa/push_strategy_latest.py | 263 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/auto-czsc-quant/auto_quant/__init__.py | 6 | __all__ = ["AutoQuantConfig", "Candidate", "run_experiment"] | CODE |
| LOW | czsc/_format_standard_kline.py | 25 | __all__ = ["format_standard_kline"] | CODE |
| LOW | czsc/__init__.py | 159 | __all__ = [ | CODE |
| LOW | czsc/eda.py | 21 | __all__ = ["mark_cta_periods", "mark_volatility", "monotonicity"] | CODE |
| LOW | czsc/mock.py | 30 | __all__ = ["generate_symbol_kines", "generate_klines_with_weights"] | CODE |
| LOW | czsc/_resample_bars.py | 42 | __all__ = ["resample_bars"] | CODE |
| LOW | czsc/traders/__init__.py | 43 | __all__ = [ | CODE |
| LOW | czsc/utils/trade.py | 89 | def update_tbars(da: pd.DataFrame, event_col: str) -> None: | CODE |
| LOW | czsc/utils/__init__.py | 73 | __all__ = [ | CODE |
| LOW | czsc/utils/analysis/__init__.py | 20 | __all__ = [ | CODE |
| LOW | czsc/utils/plotting/_macd.py | 14 | __all__ = ["compute_macd"] | CODE |
| LOW | czsc/utils/plotting/lightweight/_signals.py | 17 | __all__ = [ | CODE |
| LOW | czsc/utils/plotting/lightweight/_data.py | 22 | __all__ = [ | CODE |
| LOW | czsc/utils/plotting/lightweight/__init__.py | 31 | __all__ = ["plot_czsc", "plot_czsc_signals", "plot_czsc_trader"] | CODE |
| LOW | czsc/utils/plotting/lightweight/_html_renderer.py | 22 | __all__ = ["render"] | CODE |
| LOW⚡ | czsc/utils/data/client.py | 113 | def _set_cache(self, file_cache: Path, df: pd.DataFrame, logger) -> None: | CODE |
| LOW | czsc/utils/data/__init__.py | 46 | __all__ = [ | CODE |
| LOW | czsc/fsa/__init__.py | 18 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | czsc/utils/optimize.py | 98 | 将单个候选信号统一转换为 ``{"key": ..., "value": ...}`` 结构。 输入可以是已经构造好的字典,也可以是缠论信号约定的字符串形式。 字符串信号通常按 ``_`` 分割成多段,最后 4 段视为信号 | STRING |
| HIGH | czsc/utils/optimize.py | 214 | 复制基准仓位并应用一条候选平仓事件,生成一份新的仓位。 Args: beta: 作为模板复制的基准 :class:`Position` 实例。 event_dict: 候选平 | STRING |
| HIGH | czsc/utils/weights_convert.py | 21 | 权重数据转换工具(Polars 优化版本) Args: weights_df: 标准持仓权重DataFrame,包含列: - dt: 时间戳(datetime) - | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | czsc/_runtime_adapters.py | 155 | CODE | |
| LOW | czsc/utils/plotting/lightweight/__init__.py | 127 | CODE | |
| LOW | czsc/cli/backtest.py | 49 | CODE | |
| LOW | czsc/fsa/im.py | 33 | CODE | |
| LOW | czsc/fsa/im.py | 93 | CODE | |
| LOW | czsc/fsa/bi_table.py | 198 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_trade_utils.py | 30 | # Check if the result DataFrame has daily data | COMMENT |