Dead code sweep (Python): legacy phase-based hook engine, tests-only helpers, unused --no-config-propose flag
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading core/environment/execution.py and the listed test callers to confirm the hook engine is test-only. Remove the dead functions from core/config/loader.py, utils/network.py, core/processing/* and others, plus the --no-config-propose flag in app.py. Migrate tests off profiles/config.py shim and delete temp_test/; run the suite to confirm no references remain and tests pass.
由索引模型根据 Issue 内容生成。
描述
Verified production-dead (grep across src/ + tests/; "tests-only" = kept alive only by tests and re-exports):
Decide: legacy phase-based hook engine. core/environment/execution.py (parse_hook_entries, run_blocking_hook, spawn_background_hook, run_hooks_for_file, HookOutcome), HookSpec (core/config/models.py:96-116), HookEntry (core/config/schema.py:61-67, labelled "legacy phase-based"). Only callers are tests/core/environment/test_execution.py + re-exports (environment/__init__.py:11-16, core/__init__.py:46-47). Production uses the step-based run_workflow. Delete now, or batch with the gui/ removal (phase-2 tracking issue).
Certain production-dead functions (drop, plus their tests):
propose_config_creation—core/config/loader.py:46-89(superseded bylaunch/creation.propose_creation+--init)load_column_rules_from_config—core/processing/column_extractor.py:256(parses a legacyCOLUMN_DEFINITIONSstring format nothing produces anymore)get_system_info—utils/network.py:65-76(duplicate ofcore/environment/system.collect_system_info)list_directory_paths—utils/file_utils.py:481-490log_rotated—core/telemetry/events.py:67(diagnostics.py:116emits the same event directly — one mechanism should win)get_file_info_dynamic—core/processing/file_classifier.py:176ScanMetrics.to_dict—core/telemetry/metrics.py:32-41(zero callers anywhere)
CLI/config leftovers
--no-config-proposeflag stored (app.py:605-610,:110) but never read — the comment atapp.py:252-255admits the behavior moved.AppConfig.skip_config_prompt(models.py:280) read only by gui/ — dies with the gui removal.
Test-side orphans
profiles/config.pyshim imported only by tests — migrate tests to real module paths and delete.- Unused conftest fixtures
sample_config_path/empty_config_path(tests/conftest.py:17-57). - Registered marker
qt_no_exception_capture(pyproject.toml:218-220) but pytest-qt is not a dependency anywhere — remove the marker, or add the dep. - Tracked scratch file
temp_test/web/package.json—git rmthe wholetemp_test/directory. tests/core/config/test_models_refactored.py,test_reader_refactored.py,tests/core/processing/test_column_extractor_refactored.pysit next to their originals — merge or delete the leftovers.
Note: the 14 gui-only telemetry helpers (app_closed, filter_changed, …) are intentionally not in this list — they die with the gui/ phase-2 removal.
- 主要语言
- Python
- 星标
- 1
- 派生
- 1
- 平均合并
- 4 小时 46 分钟
- 30 天内合并 PR
- 55
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
falbany/ProFiles 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
falbany/ProFiles#187 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
ip-tools/patzilla#219 · 2 条评论 ·
维护者通常 1 天内回复
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushes未关闭priority:p3 technical-debt
难度 2/5 1-3 小时 新手友好度 82/100
jimmy058910/jmo-security-repo#1673 ·
维护者通常 1 天内回复
-
enhancement ready
难度 2/5 1-3 小时 新手友好度 86/100
-
integration: frontier_silicon
难度 2/5 1-3 小时 新手友好度 70/100
home-assistant/core#193176 · 2 条评论 ·
维护者通常 1 天内回复
-
task create and task update take --body-file and --stdin可能已有人在做 @JuanBarriosS 今天认领。 未关闭cli enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 92/100
pyrite-wiki/pyrite#1687 · 1 条评论 ·
维护者通常 1 天内回复