Repository Analysis

waditu/czsc

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

13.1 Low AI signal View on GitHub

Analysis Overview

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).

13.1
Adjusted Score
13.1
Raw Score
100%
Time Factor
2026-08-09
Last Push
5.7K
Stars
Rust
Language
83.1K
Lines of Code
583
Files
946
Pattern Hits
2026-08-09
Scan Date
0.10
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 57MEDIUM 47LOW 842

Directory Score Breakdown

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.

Pattern Findings

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.

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
LOWtests/test_lightweight_plotting.py82 def test_naive_datetime_uses_fixed_utc_epoch_across_host_timezones(self):CODE
LOWtests/test_lightweight_plotting.py91 def test_aware_datetime_keeps_its_own_timezone_semantics(self):CODE
LOWtests/test_lightweight_plotting.py97 def test_candle_count_equals_bars_raw(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py102 def test_fx_line_connects_all_fractals(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py127 def test_sma_length_and_nan_head(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py146 def test_macd_three_series_aligned(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py154 def test_time_strictly_monotonic(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py161 def test_tail_bars_truncates_all_series(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py184 def test_panes_freq_order_large_to_small(self, trader_multi: CzscTrader):CODE
LOWtests/test_lightweight_plotting.py189 def test_each_pane_has_three_series(self, trader_multi: CzscTrader):CODE
LOWtests/test_lightweight_plotting.py242 def test_no_chinese_fx_labels(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py253 def test_multi_freq_renders_tabs(self, trader_multi: CzscTrader):CODE
LOWtests/test_lightweight_plotting.py265 def test_plot_czsc_returns_html_string_when_path_is_none(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py270 def test_plot_czsc_writes_file(self, tmp_path, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py277 def test_plot_czsc_trader_writes_multi_panes(self, tmp_path, trader_multi: CzscTrader):CODE
LOWtests/test_lightweight_plotting.py286 def test_plot_czsc_unknown_output_raises(self, czsc_30m: CZSC):CODE
LOWtests/test_lightweight_plotting.py290 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
LOWtests/test_auto_czsc_quant.py50def test_load_valid_candidates_accepts_position_dict() -> None:CODE
LOWtests/test_auto_czsc_quant.py58def test_load_valid_candidates_rejects_bad_rows() -> None:CODE
LOWtests/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
MEDIUMtests/unit/test_resample_bars.py75# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_resample_bars.py77# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_resample_bars.py91# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_resample_bars.py93# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_resample_bars.py155# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_resample_bars.py157# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_resample_bars.py241# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/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.py521 assert "trio.push(cSig)" in htmlCODE
HIGHtests/test_lightweight_signals.py510 """cSig 通过 trio.push(cSig) 进入 trio,由 trio.forEach 统一同步——STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py268 var crosshairTime = null; // 最近一次 hover 的 unix 秒;用于跨 tab 联动STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py269 var dashedLineStyle = LightweightCharts && LightweightCharts.LineStyleSTRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py274 var w = container.clientWidth || (container.parentElement && container.parentElement.clientWidth) || 800;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py275 var h = container.clientHeight || 200;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py311 function fmt(v) { return (v == null) ? '—' : Number(v).toFixed(2); }STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py315 if (v == null) return '—';STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py324 var pct = prev && prev.close ? (change / prev.close * 100) : 0;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py330 var macdCls = (macd && macd.macd != null) ? clsOf(macd.macd) : '';STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py330 var macdCls = (macd && macd.macd != null) ? clsOf(macd.macd) : '';STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py331 var diffCls = (macd && macd.diff != null) ? clsOf(macd.diff) : '';STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py331 var diffCls = (macd && macd.diff != null) ? clsOf(macd.diff) : '';STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py453 var sma5 = (freq.main.sma5 && freq.main.sma5.length)STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py454 ? cMain.addLineSeries(Object.assign({ color: theme.sma5 }, smaCommon)) : null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py456 var sma20 = (freq.main.sma20 && freq.main.sma20.length)STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py457 ? cMain.addLineSeries(Object.assign({ color: theme.sma20 }, smaCommon)) : null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py459 var fx = (freq.main.fx_line && freq.main.fx_line.length)STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py460 ? cMain.addLineSeries(Object.assign({ color: theme.fx_dashed, lineStyle: dashedLineStyle }, smaCommon)) : null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py462 var bi = (freq.main.bi_line && freq.main.bi_line.length)STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py463 ? cMain.addLineSeries(Object.assign({ color: theme.bi, lineWidth: 2 }, { priceLineVisible: false, lastValueVisibSTRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py504 while (ptrByKey[s.key] < ms.length && ms[ptrByKey[s.key]].time <= c.time) {STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py510 snapshot.push({ key: s.key, v1: m.v1, value: m.value, color: m.color, direction: m.direction });STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py515 var highlightedKey = null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py654 trio.push(cSig);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py655 trioEls.push(sigEl);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py658 primarySeries.push(sigRowSeriesByKey[firstRowKey]);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py668 if (!r || lockTime) return;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py697 if (param && param.time != null) {STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py697 if (param && param.time != null) {STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py700 if (!lockCh && param && param.time) {STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py714 var prev = entry.idx > 0 ? candleByTime[orderedCandles[entry.idx - 1].time] : null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py716 var m = macdByTime[param.time] || null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py722 tipEl.innerHTML = tooltipHTML(c, prev ? prev.ohlc : null, m, sigs);STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py724 var px = param.point ? param.point.x : null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py725 var py = param.point ? param.point.y : null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py726 if (px == null || py == null || i !== 0) {STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py735 var hovered = null;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py736 if (param && param.hoveredSeries) {STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py889 if (crosshairTime == null) return;STRING
HIGHczsc/utils/plotting/lightweight/_html_renderer.py893 var nearest = null;STRING
HIGHczsc/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
LOWtests/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
LOWczsc/utils/data/client.py109 except Exception as e:CODE
LOWczsc/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
LOWczsc/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
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_trade_utils.py30 # Check if the result DataFrame has daily dataCOMMENT