AI Slop Code RIsk Monitor

waditu/czsc

缠中说禅技术分析工具;缠论;股票;期货;Quant;量化交易

13.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for waditu/czsc, a Rust project with 6,395 GitHub stars. SynthScan examined 83,208 lines of code across 583 source files, recording 947 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 13.2 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

13.2
Adjusted Signal
13.2
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
6.4K
Stars
Rust
Language
83.2K
Lines of Code
583
Files
947
Pattern Hits
2026-10-12
Scan Date
0.10
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 27.5/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 537 finding(s).

Hallucinated Dependency & Supply Chain Risk 18.4/100 · LOW

Are imports declared and package/API names verified? 306 finding(s).

Agent Over-Engineering Ratio 25.1/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 345 finding(s).

PR Review Velocity Impact 55.1/100 · HIGH

Which changes need focused human review? 947 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 58MEDIUM 47LOW 842

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 947 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers235 hits · 256 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py26def test_freqs_sorted_unknown_freq_to_tail():CODE
LOWtests/test_lightweight_plotting.py56def _shanghai_naive_to_utc_epoch(dt: datetime) -> int:CODE
LOW⚡tests/test_lightweight_plotting.py82 def test_naive_datetime_uses_fixed_utc_epoch_across_host_timezones(self):CODE
LOW⚡tests/test_lightweight_plotting.py91 def test_aware_datetime_keeps_its_own_timezone_semantics(self):CODE
LOW⚡tests/test_lightweight_plotting.py97 def test_candle_count_equals_bars_raw(self, czsc_30m: CZSC):CODE
LOW⚡tests/test_lightweight_plotting.py102 def test_fx_line_connects_all_fractals(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py129 def test_sma_length_and_nan_head(self, czsc_30m: CZSC):CODE
LOW⚡tests/test_lightweight_plotting.py148 def test_macd_three_series_aligned(self, czsc_30m: CZSC):CODE
LOW⚡tests/test_lightweight_plotting.py156 def test_time_strictly_monotonic(self, czsc_30m: CZSC):CODE
LOW⚡tests/test_lightweight_plotting.py163 def test_tail_bars_truncates_all_series(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py186 def test_panes_freq_order_large_to_small(self, trader_multi: CzscTrader):CODE
LOWtests/test_lightweight_plotting.py191 def test_each_pane_has_three_series(self, trader_multi: CzscTrader):CODE
LOWtests/test_lightweight_plotting.py244 def test_no_chinese_fx_labels(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py255 def test_multi_freq_renders_tabs(self, trader_multi: CzscTrader):CODE
LOW⚡tests/test_lightweight_plotting.py267 def test_plot_czsc_returns_html_string_when_path_is_none(self, czsc_30m: CZSC):CODE
LOW⚡tests/test_lightweight_plotting.py272 def test_plot_czsc_writes_file(self, tmp_path, czsc_30m: CZSC):CODE
LOW⚡tests/test_lightweight_plotting.py279 def test_plot_czsc_trader_writes_multi_panes(self, tmp_path, trader_multi: CzscTrader):CODE
LOW⚡tests/test_lightweight_plotting.py288 def test_plot_czsc_unknown_output_raises(self, czsc_30m: CZSC):CODE
LOW⚡tests/test_lightweight_plotting.py292 def test_plot_czsc_trader_rejects_bad_object(self):CODE
LOWtests/conftest.py19def pytest_collection_modifyitems(config, items):CODE
LOWtests/test_envs.py40 def test_legacy_helper_removed(self, name: str) -> None:CODE
LOWtests/test_envs.py51 def test_env_helper_still_exists(self) -> None:CODE
LOWtests/test_weights_convert.py171def test_multi_day_complex_scenario():CODE
LOWtests/test_utils_refactored.py23def test_plotting_weight_module_removed():CODE
LOWtests/test_utils_refactored.py135def test_analysis_stats_module_removed():CODE
LOWtests/test_utils_refactored.py158def test_analysis_corr_imports():CODE
LOWtests/test_utils_refactored.py169def test_backward_compatibility():CODE
LOWtests/test_kline_quality.py16def test_check_kline_quality_structure():CODE
LOW⚡tests/test_auto_czsc_quant.py50def test_load_valid_candidates_accepts_position_dict() -> None:CODE
LOW⚡tests/test_auto_czsc_quant.py58def test_load_valid_candidates_rejects_bad_rows() -> None:CODE
LOW⚡tests/test_auto_czsc_quant.py68def test_run_experiment_with_mock_data(tmp_path: Path) -> None:CODE
LOWtests/test_auto_czsc_quant.py100def test_load_feather_bars_standard_ohlcv(tmp_path: Path) -> None:CODE
LOWtests/test_auto_czsc_quant.py120def test_parse_candidate_text_accepts_jsonl_and_fences() -> None:CODE
LOWtests/test_trade_utils_extended.py78 def test_missing_columns_raises(self):CODE
LOWtests/test_trade_utils_extended.py96 def test_invalid_price_col_raises(self):CODE
LOWtests/test_trade_utils_extended.py127 def test_direction_multiplication(self):CODE
LOWtests/test_trade_utils_extended.py173 def test_invalid_hold_period_raises(self, sample_df):CODE
LOWtests/test_warning_capture.py15def test_capture_warnings_no_warning():CODE
LOWtests/test_warning_capture.py28def test_capture_warnings_with_warning():CODE
LOWtests/test_warning_capture.py43def test_capture_warnings_multiple_warnings():CODE
LOWtests/test_warning_capture.py62def test_capture_warnings_with_exception():CODE
LOWtests/test_warning_capture.py80def test_execute_with_warning_capture_no_warning():CODE
LOWtests/test_warning_capture.py92def test_execute_with_warning_capture_with_warning():CODE
LOWtests/test_warning_capture.py106def test_execute_with_warning_capture_with_args():CODE
LOWtests/test_warning_capture.py120def test_execute_with_warning_capture_with_kwargs():CODE
LOWtests/test_warning_capture.py134def test_execute_with_warning_capture_return_as_string():CODE
LOWtests/test_warning_capture.py150def test_execute_with_warning_capture_no_warning_string():CODE
LOWtests/test_warning_capture.py162def test_execute_with_warning_capture_exception():CODE
LOWtests/test_warning_capture.py173def test_warning_capture_context_manager_isolation():CODE
LOWtests/test_warning_capture.py198def test_execute_with_warning_capture_drop_duplicates_true():CODE
LOWtests/test_warning_capture.py223def test_execute_with_warning_capture_drop_duplicates_false():CODE
LOWtests/test_warning_capture.py231 def emit_two_distinct_warnings():CODE
LOWtests/test_warning_capture.py245def test_execute_with_warning_capture_drop_duplicates_order():CODE
LOWtests/test_warning_capture.py269def test_execute_with_warning_capture_drop_duplicates_with_string_return():CODE
LOWtests/test_warning_capture.py302def test_execute_with_warning_capture_no_warnings_drop_duplicates():CODE
LOWtests/test_warning_capture.py321def test_drop_duplicates_with_real_scenario():CODE
LOWtests/test_warning_capture.py325 def process_data_with_warnings():CODE
LOWtests/test_utils_cache.py125def test_disk_cache_dataframe():CODE
LOWtests/test_utils_cache.py212def test_disk_cache_decorator():CODE
LOWtests/test_utils_cache.py347def test_disk_cache_with_custom_ttl():CODE
175 more matches not shown…
Over-Commented Block271 hits · 237 pts
SeverityFileLineSnippetContext
LOWcrates/czsc-ta/src/lib.rs1//! czsc-ta — technical analysis operators.COMMENT
LOWcrates/czsc-ta/src/python.rs241COMMENT
LOWcrates/czsc-ta/src/mixed/chip_dist.rs1use ordered_float::OrderedFloat;COMMENT
LOWcrates/czsc-ta/src/mixed/chip_dist.rs21/// arr2 = df[columns].to_numpy(dtype=np.float64)COMMENT
LOWcrates/czsc-utils/src/monotonicity.rs1//! Spearman 单调性系数(对齐 `scipy.stats.spearmanr` 的 Spearman 相关)。COMMENT
LOWcrates/czsc-utils/src/bar_generator.rs141 ///COMMENT
LOWcrates/czsc-utils/src/bar_generator.rs201 /// # 函数计算逻辑COMMENT
LOWcrates/czsc-utils/src/bar_generator.rs321 /// 获取所属品种COMMENT
LOWcrates/czsc-utils/src/bar_generator.rs341 /// 5. 维护数据量:COMMENT
LOWcrates/czsc-utils/src/resample.rs1//! 批量 K 线重采样:等价于历史 Python `czsc.resample_bars`。COMMENT
LOWcrates/czsc-utils/src/resample.rs21//!COMMENT
LOWcrates/czsc-utils/src/freq_data.rs121}COMMENT
LOWcrates/czsc-utils/src/freq_data.rs141// // 遍历所有包含 "分钟" 的列名COMMENT
LOWcrates/czsc-utils/src/freq_data.rs381 // #[test]COMMENT
LOWcrates/czsc-utils/src/python/mod.rs21/// `czsc.freq_end_time(dt, freq, market=Market.Default)` → datetime。COMMENT
LOWcrates/czsc-signal-macros/tests/test_export.rs1//! Phase E.last — smoke test:czsc-signal-macros 能编译,且测试二进制COMMENT
LOWcrates/czsc-signals/src/kcatr.rs1use crate::params::ParamView;COMMENT
LOWcrates/czsc-signals/src/clv.rs1use crate::params::ParamView;COMMENT
LOWcrates/czsc-signals/src/ntmdk.rs1use crate::params::ParamView;COMMENT
LOWcrates/czsc-signals/src/tas.rs81/// tas_ma_base_V221101:单均线多空与方向信号COMMENT
LOWcrates/czsc-signals/src/tas.rs141}COMMENT
LOWcrates/czsc-signals/src/tas.rs201COMMENT
LOWcrates/czsc-signals/src/tas.rs281}COMMENT
LOWcrates/czsc-signals/src/tas.rs361 make_kline_signal_v1(&k1, &k2, k3, v1)COMMENT
LOWcrates/czsc-signals/src/tas.rs481///COMMENT
LOWcrates/czsc-signals/src/tas.rs541 let k3 = "BS辅助V221028";COMMENT
LOWcrates/czsc-signals/src/tas.rs681/// 参数模板:`"{freq}_D{di}N{n}#{ma_type}#{timeperiod}_BS1辅助V230217"`COMMENT
LOWcrates/czsc-signals/src/tas.rs781 v1 = "一卖";COMMENT
LOWcrates/czsc-signals/src/tas.rs861 && close_last < sma[n - 1]COMMENT
LOWcrates/czsc-signals/src/tas.rs881/// 3. 二卖条件与上面对称;COMMENT
LOWcrates/czsc-signals/src/tas.rs981/// 信号逻辑:COMMENT
LOWcrates/czsc-signals/src/tas.rs1041COMMENT
LOWcrates/czsc-signals/src/tas.rs1101COMMENT
LOWcrates/czsc-signals/src/tas.rs1301 if max_count > sc && sc >= min_count {COMMENT
LOWcrates/czsc-signals/src/tas.rs1361 "看多"COMMENT
LOWcrates/czsc-signals/src/tas.rs1441/// 4. 最近 20 根中,`ret > 1.0 * ret_std` 达到 16 次判 `扩散`(覆盖前者)。COMMENT
LOWcrates/czsc-signals/src/tas.rs1541/// 参数模板:`"{freq}_DIF分层W{w}T{t}_完全分类V241010"`COMMENT
LOWcrates/czsc-signals/src/tas.rs1741 v2 = format!("0轴上死叉第{}次", sc);COMMENT
LOWcrates/czsc-signals/src/tas.rs1821 } else if j == 0 && sc >= s {COMMENT
LOWcrates/czsc-signals/src/tas.rs1901/// 2. 最新收盘价在上轨上方,且窗口内曾有收盘价在上轨下方,判 `看多`;COMMENT
LOWcrates/czsc-signals/src/tas.rs1961 make_kline_signal_v1(&k1, &k2, k3, v1)COMMENT
LOWcrates/czsc-signals/src/tas.rs2041/// 1. 固定计算 `CCI(14)`;COMMENT
LOWcrates/czsc-signals/src/tas.rs2101COMMENT
LOWcrates/czsc-signals/src/tas.rs2181 }COMMENT
LOWcrates/czsc-signals/src/tas.rs2261/// tas_atr_V230630:ATR 波动分层信号COMMENT
LOWcrates/czsc-signals/src/tas.rs2321/// 参数模板:`"{freq}_D{di}MACD{fastperiod}#{slowperiod}#{signalperiod}MO{max_overlap}#{key}_BS辅助V230320"`COMMENT
LOWcrates/czsc-signals/src/tas.rs2401 return make_kline_signal_v1(&k1, &k2, k3, v1);COMMENT
LOWcrates/czsc-signals/src/tas.rs2501/// 3. 若 `diffs` 全部大于0,且 `diffs[-1]` 靠近零轴,同时 `max(diffs)` 显著高于均值+标准差,判 `买点`;COMMENT
LOWcrates/czsc-signals/src/tas.rs2561COMMENT
LOWcrates/czsc-signals/src/tas.rs2641 && last < deltaCOMMENT
LOWcrates/czsc-signals/src/tas.rs2761 }COMMENT
LOWcrates/czsc-signals/src/tas.rs2841 }COMMENT
LOWcrates/czsc-signals/src/tas.rs2921 make_kline_signal_v1(&k1, &k2, k3, v1)COMMENT
LOWcrates/czsc-signals/src/tas.rs3021/// 参数模板:`"{freq}_MACD双分型背驰_BS辅助V230803"`COMMENT
LOWcrates/czsc-signals/src/tas.rs3221/// 2. 按等宽区间切分为 `n` 层;COMMENT
LOWcrates/czsc-signals/src/tas.rs3261 .map(|q| format!("第{}层", q))COMMENT
LOWcrates/czsc-signals/src/tas.rs3321 "多头远离".to_string()COMMENT
LOWcrates/czsc-signals/src/tas.rs3481COMMENT
LOWcrates/czsc-signals/src/tas.rs3701/// 3. 按跨零关系判定 `空翻多/多翻空`。COMMENT
LOWcrates/czsc-signals/src/tas.rs3761COMMENT
211 more matches not shown…
Unused Imports252 hits · 204 pts
SeverityFileLineSnippetContext
LOWtests/test_lightweight_plotting.py12CODE
LOWtests/test_envs.py25CODE
LOWtests/test_auto_czsc_quant.py1CODE
LOWtests/test_lightweight_signals.py6CODE
LOWtests/test_lightweight_signals.py9CODE
LOWtests/test_lightweight_signals.py12CODE
LOWtests/smoke/test_install.py22CODE
LOWtests/unit/test_strategy_save_load_parity.py18CODE
LOWtests/unit/test_resample_bars.py22CODE
LOWtests/unit/test_core_parity.py23CODE
LOWtests/unit/test_structure_analysis_api.py1CODE
LOWtests/unit/test_pickle.py24CODE
LOWtests/unit/test_native_enum_ergonomics.py18CODE
LOWtests/unit/test_monotonicity_parity.py13CODE
LOWtests/unit/test_trading_time.py23CODE
LOWtests/unit/test_strategy_unique_signals_parity.py17CODE
LOWtests/unit/test_hot_start_snapshot.py16CODE
LOWtests/compat/test_utils_stub_in_sync.py20CODE
LOWtests/compat/test_drop_secondary_api.py25CODE
LOWtests/compat/test_api_no_streamlit.py22CODE
LOWtests/compat/test_public_api.py19CODE
LOWtests/integration/test_weight_backtest.py20CODE
LOW…/czsc-write-signal-function/scripts/new_signal_stub.py4CODE
LOWdocs/examples/17_perf_benchmark.py17CODE
LOWdocs/examples/01_quick_start.py16CODE
LOWdocs/examples/18_tushare_daily_event_universe.py34CODE
LOWdocs/examples/07_strategy_backtest.py21CODE
LOWdocs/examples/14_tushare_event_backtest.py20CODE
LOWdocs/examples/15_lightweight_signals_html.py14CODE
LOWdocs/examples/05_signals.py22CODE
LOWdocs/examples/08_weight_backtest.py23CODE
LOWdocs/examples/04_bar_generator.py18CODE
LOWdocs/examples/13_event_weight_backtest.py23CODE
LOWdocs/examples/06_event_position.py23CODE
LOWdocs/examples/06_event_position.py25CODE
LOWdocs/examples/02_chan_structures.py15CODE
LOWdocs/examples/13_lightweight_charts_html.py18CODE
LOWscripts/dump_signal_details.py14CODE
LOWscripts/dump_signal_catalog.py11CODE
LOWscripts/sector_purity_analysis.py38CODE
LOWscripts/auto-czsc-quant/auto_quant/signals.py8CODE
LOWscripts/auto-czsc-quant/auto_quant/runner.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/journal.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/html_report.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/__init__.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/__init__.py4CODE
LOWscripts/auto-czsc-quant/auto_quant/__init__.py4CODE
LOWscripts/auto-czsc-quant/auto_quant/llm.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/validate.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/cli.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/goal_prompt.py8CODE
LOWscripts/auto-czsc-quant/auto_quant/backtest.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/data.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/schema.py3CODE
LOWscripts/auto-czsc-quant/auto_quant/scorer.py3CODE
LOWczsc/envs.py13CODE
LOWczsc/_runtime_adapters.py26CODE
LOWczsc/models.py14CODE
LOWczsc/strategies.py23CODE
LOWczsc/research.py16CODE
192 more matches not shown…
Decorative Section Separators47 hits · 158 pts
SeverityFileLineSnippetContext
MEDIUMcrates/czsc/src/lib.rs35// ── 子模块命名空间 ─────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/czsc/src/lib.rs67// ── 顶层 re-export:常用类型直接挂在 czsc::* ────────────────────────────────COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py75# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py77# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py91# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py93# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py155# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py157# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py241# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_resample_bars.py243# ---------------------------------------------------------------------------COMMENT
MEDIUM…skills/signal-functions/scripts/extract_signal_docs.py15# ── 文档块解析 ──────────────────────────────────────────────────────COMMENT
MEDIUM…skills/signal-functions/scripts/extract_signal_docs.py140# ── Markdown 生成 ──────────────────────────────────────────────────COMMENT
MEDIUM…skills/signal-functions/scripts/extract_signal_docs.py225# ── 主流程 ─────────────────────────────────────────────────────────COMMENT
MEDIUMscripts/sector_purity_analysis.py72# ============================================================================COMMENT
MEDIUMscripts/sector_purity_analysis.py74# ============================================================================COMMENT
MEDIUMscripts/sector_purity_analysis.py182# ============================================================================COMMENT
MEDIUMscripts/sector_purity_analysis.py184# ============================================================================COMMENT
MEDIUMscripts/sector_purity_analysis.py321# ============================================================================COMMENT
MEDIUMscripts/sector_purity_analysis.py323# ============================================================================COMMENT
MEDIUMscripts/sector_purity_analysis.py460# ============================================================================COMMENT
MEDIUMscripts/sector_purity_analysis.py462# ============================================================================COMMENT
MEDIUM.github/workflows/python-publish.yml39 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml47 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml118 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml120 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml150 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml166 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml213 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml215 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml246 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml252 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml346 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/python-publish.yml348 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/rust-publish.yml124 # ------------------------------------------------------------------COMMENT
MEDIUM⚡.github/workflows/rust-publish.yml137 # ------------------------------------------------------------------COMMENT
MEDIUM⚡.github/workflows/rust-publish.yml145 # ------------------------------------------------------------------COMMENT
MEDIUM⚡.github/workflows/rust-publish.yml149 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/code-quality.yml15 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/code-quality.yml24 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/code-quality.yml68 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/code-quality.yml82 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/code-quality.yml120 # ------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/code-quality.yml124 # ------------------------------------------------------------------COMMENT
MEDIUMczsc/utils/optimize.py47# ----------------------------------------------------------------------------COMMENT
MEDIUMczsc/utils/optimize.py49# ----------------------------------------------------------------------------COMMENT
MEDIUMczsc/utils/__init__.py25# ---------------------------------------------------------------------------COMMENT
MEDIUMczsc/utils/__init__.py27# ---------------------------------------------------------------------------COMMENT
Cross-Language Confusion54 hits · 135 pts
SeverityFileLineSnippetContext
HIGHtests/test_lightweight_signals.py519 assert "trio.push(cSig)" in htmlCODE
HIGHtests/test_lightweight_signals.py508 """cSig 通过 trio.push(cSig) 进入 trio,由 trio.forEach 统一同步——STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py268 var crosshairTime = null; // 最近一次 hover 的 unix 秒;用于跨 tab 联动STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py269 var dashedLineStyle = LightweightCharts && LightweightCharts.LineStyleSTRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py274 var w = container.clientWidth || (container.parentElement && container.parentElement.clientWidth) || 800;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py275 var h = container.clientHeight || 200;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py311 function fmt(v) { return (v == null) ? '—' : Number(v).toFixed(2); }STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py315 if (v == null) return '—';STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py324 var pct = prev && prev.close ? (change / prev.close * 100) : 0;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py330 var macdCls = (macd && macd.macd != null) ? clsOf(macd.macd) : '';STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py330 var macdCls = (macd && macd.macd != null) ? clsOf(macd.macd) : '';STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py331 var diffCls = (macd && macd.diff != null) ? clsOf(macd.diff) : '';STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py331 var diffCls = (macd && macd.diff != null) ? clsOf(macd.diff) : '';STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py453 var sma5 = (freq.main.sma5 && freq.main.sma5.length)STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py454 ? cMain.addLineSeries(Object.assign({ color: theme.sma5 }, smaCommon)) : null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py456 var sma20 = (freq.main.sma20 && freq.main.sma20.length)STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py457 ? cMain.addLineSeries(Object.assign({ color: theme.sma20 }, smaCommon)) : null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py459 var fx = (freq.main.fx_line && freq.main.fx_line.length)STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py460 ? cMain.addLineSeries(Object.assign({ color: theme.fx_dashed, lineStyle: dashedLineStyle }, smaCommon)) : null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py462 var bi = (freq.main.bi_line && freq.main.bi_line.length)STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py463 ? cMain.addLineSeries(Object.assign({ color: theme.bi, lineWidth: 2 }, { priceLineVisible: false, lastValueVisibSTRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py504 while (ptrByKey[s.key] < ms.length && ms[ptrByKey[s.key]].time <= c.time) {STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py510 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.py515 var highlightedKey = null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py654 trio.push(cSig);STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py655 trioEls.push(sigEl);STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py658 primarySeries.push(sigRowSeriesByKey[firstRowKey]);STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py668 if (!r || lockTime) return;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py697 if (param && param.time != null) {STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py697 if (param && param.time != null) {STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py700 if (!lockCh && param && param.time) {STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py714 var prev = entry.idx > 0 ? candleByTime[orderedCandles[entry.idx - 1].time] : null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py716 var m = macdByTime[param.time] || null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py722 tipEl.innerHTML = tooltipHTML(c, prev ? prev.ohlc : null, m, sigs);STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py724 var px = param.point ? param.point.x : null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py725 var py = param.point ? param.point.y : null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py726 if (px == null || py == null || i !== 0) {STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py735 var hovered = null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py736 if (param && param.hoveredSeries) {STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py889 if (crosshairTime == null) return;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py893 var nearest = null;STRING
HIGH⚡czsc/utils/plotting/lightweight/_html_renderer.py900 if (nearest == null) return;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py360 if (signals && signals.length) {STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py379 var w = tooltipEl.offsetWidth || 220, h = tooltipEl.offsetHeight || 200;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py399 var v = (b.value == null) ? 0 : Number(b.value);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py485 signalMarkersAll.push(entry);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py530 var isHi = (highlightedKey !== null && m.__key === highlightedKey);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py531 var isDim = (highlightedKey !== null && m.__key !== highlightedKey);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py633 var isHi = (highlightedKey !== null && key === highlightedKey);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py634 var isDim = (highlightedKey !== null && key !== highlightedKey);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py762 groups.push({STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py772 meta.insertBefore(divider, meta.querySelector('.pane-meta__hint') || null);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py797 highlightedKey = null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py802 meta.insertBefore(chip, meta.querySelector('.pane-meta__hint') || null);STRING
Excessive Try-Catch Wrapping38 hits · 40 pts
SeverityFileLineSnippetContext
LOWtests/unit/test_core_parity.py56 except Exception as exc: # noqa: BLE001CODE
LOWtests/unit/test_pickle.py47 except Exception as exc: # noqa: BLE001CODE
LOWtests/unit/test_pickle.py54 except Exception as exc: # noqa: BLE001CODE
LOWtests/unit/test_pickle.py90 except Exception as exc: # noqa: BLE001CODE
LOWtests/unit/test_pickle.py124 except Exception as exc: # noqa: BLE001CODE
LOWtests/unit/test_trading_time.py37 except Exception as exc: # noqa: BLE001CODE
LOW⚡tests/compat/test_drop_secondary_api.py122 except Exception as exc: # noqa: BLE001CODE
LOWtests/compat/test_public_api.py45 except Exception as exc: # noqa: BLE001CODE
LOWtests/integration/test_weight_backtest.py35 except Exception as exc: # noqa: BLE001CODE
LOWdocs/examples/18_tushare_daily_event_universe.py246 except Exception as e: # noqa: BLE001CODE
LOWdocs/superpowers/plans/2026-06-02-czsc-cli.md311 except Exception as e: # noqa: BLE001CODE
LOWscripts/sector_purity_analysis.py129 except Exception: # noqa: BLE001CODE
LOWscripts/sector_purity_analysis.py164 except Exception as e: # noqa: BLE001CODE
LOWscripts/auto-czsc-quant/auto_quant/signals.py27 except Exception: # noqa: BLE001 - 注册表不可用时降级为空。CODE
LOWscripts/auto-czsc-quant/auto_quant/signals.py103 except Exception: # noqa: BLE001CODE
LOWscripts/auto-czsc-quant/auto_quant/runner.py166 except Exception as curve_exc: # noqa: BLE001CODE
LOWscripts/auto-czsc-quant/auto_quant/runner.py169 except Exception as exc: # noqa: BLE001 - experiment runners must record candidate failures.CODE
LOWscripts/auto-czsc-quant/auto_quant/validate.py115 except Exception as load_exc: # noqa: BLE001 - validation should report load failures.CODE
LOWscripts/auto-czsc-quant/auto_quant/validate.py118 except Exception as json_exc: # noqa: BLE001CODE
LOWscripts/auto-czsc-quant/auto_quant/validate.py164 except Exception: # noqa: BLE001CODE
LOWscripts/auto-czsc-quant/auto_quant/goal_prompt.py67 except Exception: # noqa: BLE001CODE
LOWczsc/connectors/ts_connector.py91 except Exception as e:CODE
LOWczsc/utils/warning_capture.py103 except Exception as e:CODE
LOWczsc/utils/data/validators.py102 except Exception as e:CODE
LOW⚡czsc/utils/data/client.py109 except Exception as e:CODE
LOW⚡czsc/utils/data/client.py118 except Exception as e:CODE
LOWczsc/utils/data/client.py153 except Exception as e:CODE
LOWczsc/utils/data/client.py180 except Exception as e:CODE
LOWczsc/utils/data/client.py200 except Exception as e:CODE
LOWczsc/utils/data/client.py213 except Exception as e:CODE
LOWczsc/utils/data/client.py232 except Exception as e:CODE
LOWczsc/cli/_io.py97 except Exception as e: # noqa: BLE001CODE
LOWczsc/fsa/__init__.py57 except Exception as e:CODE
LOWczsc/fsa/__init__.py90 except Exception as e:CODE
LOWczsc/fsa/__init__.py164 except Exception as e:CODE
LOWczsc/fsa/__init__.py200 except Exception as e:CODE
LOWczsc/fsa/push_strategy_latest.py81 except Exception:CODE
LOWczsc/fsa/push_strategy_latest.py377 except Exception as e:CODE
Deep Nesting21 hits · 21 pts
SeverityFileLineSnippetContext
LOWtests/compat/test_utils_stub_in_sync.py31CODE
LOW…skills/signal-functions/scripts/extract_signal_docs.py26CODE
LOWscripts/dump_signal_details.py93CODE
LOWscripts/dump_signal_details.py203CODE
LOWscripts/dump_signal_catalog.py70CODE
LOWscripts/auto-czsc-quant/auto_quant/validate.py29CODE
LOWscripts/auto-czsc-quant/auto_quant/validate.py40CODE
LOWscripts/auto-czsc-quant/auto_quant/goal_prompt.py47CODE
LOWczsc/utils/kline_quality.py28CODE
LOWczsc/utils/plotting/lightweight/_signals.py105CODE
LOWczsc/utils/plotting/lightweight/__init__.py127CODE
LOWczsc/utils/data/client.py100CODE
LOWczsc/utils/data/client.py121CODE
LOWczsc/utils/data/client.py219CODE
LOWczsc/utils/data/cache.py29CODE
LOWczsc/utils/data/cache.py81CODE
LOWczsc/utils/data/cache.py116CODE
LOWczsc/cli/_io.py46CODE
LOWczsc/fsa/__init__.py131CODE
LOWczsc/fsa/push_strategy_latest.py157CODE
LOWczsc/fsa/push_strategy_latest.py263CODE
Modern Structural Boilerplate18 hits · 18 pts
SeverityFileLineSnippetContext
LOWscripts/auto-czsc-quant/auto_quant/__init__.py6__all__ = ["AutoQuantConfig", "Candidate", "run_experiment"]CODE
LOWczsc/_format_standard_kline.py25__all__ = ["format_standard_kline"]CODE
LOWczsc/__init__.py159__all__ = [CODE
LOWczsc/eda.py21__all__ = ["mark_cta_periods", "mark_volatility", "monotonicity"]CODE
LOWczsc/mock.py30__all__ = ["generate_symbol_kines", "generate_klines_with_weights"]CODE
LOWczsc/_resample_bars.py42__all__ = ["resample_bars"]CODE
LOWczsc/traders/__init__.py43__all__ = [CODE
LOWczsc/utils/trade.py89def update_tbars(da: pd.DataFrame, event_col: str) -> None:CODE
LOWczsc/utils/__init__.py73__all__ = [CODE
LOWczsc/utils/analysis/__init__.py20__all__ = [CODE
LOWczsc/utils/plotting/_macd.py14__all__ = ["compute_macd"]CODE
LOWczsc/utils/plotting/lightweight/_signals.py17__all__ = [CODE
LOWczsc/utils/plotting/lightweight/_data.py22__all__ = [CODE
LOWczsc/utils/plotting/lightweight/__init__.py31__all__ = ["plot_czsc", "plot_czsc_signals", "plot_czsc_trader"]CODE
LOWczsc/utils/plotting/lightweight/_html_renderer.py22__all__ = ["render"]CODE
LOW⚡czsc/utils/data/client.py113 def _set_cache(self, file_cache: Path, df: pd.DataFrame, logger) -> None:CODE
LOWczsc/utils/data/__init__.py46__all__ = [CODE
LOWczsc/fsa/__init__.py18__all__ = [CODE
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHczsc/utils/optimize.py98将单个候选信号统一转换为 ``{"key": ..., "value": ...}`` 结构。 输入可以是已经构造好的字典,也可以是缠论信号约定的字符串形式。 字符串信号通常按 ``_`` 分割成多段,最后 4 段视为信号STRING
HIGHczsc/utils/optimize.py214复制基准仓位并应用一条候选平仓事件,生成一份新的仓位。 Args: beta: 作为模板复制的基准 :class:`Position` 实例。 event_dict: 候选平STRING
HIGHczsc/utils/weights_convert.py21权重数据转换工具(Polars 优化版本) Args: weights_df: 标准持仓权重DataFrame,包含列: - dt: 时间戳(datetime) - STRING
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWczsc/_runtime_adapters.py155CODE
LOWczsc/utils/plotting/lightweight/__init__.py127CODE
LOWczsc/cli/backtest.py49CODE
LOWczsc/fsa/im.py33CODE
LOWczsc/fsa/im.py93CODE
LOWczsc/fsa/bi_table.py198CODE
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHscripts/auto-czsc-quant/auto_quant/goal_prompt.py67except Exception: # noqa: BLE001CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_trade_utils.py30 # Check if the result DataFrame has daily dataCOMMENT