Repository navigation
Closed
Labels
Description
Why it matters
After the recent refactors a layer of leftovers remains. None is a bug on its own, but together they mislead new contributors about what is live, and one shows users a misleading number.
Evidence
Engine leftovers (autoclicker/core/click_engine.py)
_should_stop(line 369) has no callers outside tests.performance_metrics["click_timings"]deque (lines 63, 439) andtotal_click_timeare filled on every click but never read by the app.reset_performance_metrics(line 216) is never called, soclick_success_count/click_error_countaccumulate across runs. The status bar's "N% success" (main_window.py:476) is therefore a lifetime figure while the cps next to it is per run.
Root clutter
run_tests.py: wrapper around pytest, superseded bymake test/tasks.bat test.requirements.txt: duplicatespyproject.tomldependencies with stale comments ("tkinter comes with Python 3.8+");requirements-lock.txtis what the launcher and CI use.autoclicker_settings.example.json: missing current keys (target_mode,hotkeys,theme,minimize_to_tray,max_cps_ceiling,enable_failsafe,pause_when_unfocused); the README's settings table is now the real reference.create_icon.pyat the root is a dev tool;scripts/ortools/already exist for those.
Typing debt (pyproject.toml [tool.mypy])
autoclicker.gui.*disablesattr-definedandarg-type;autoclicker.core.click_enginedisablesoperator,assignment,call-overload,attr-defined. These hide real mistakes in the two most important modules. The engine ones mostly come from the untypedperformance_metricsdict.
Suggested approach
- Delete
_should_stop, the unused metrics, and either reset metrics instart_clickingor drop the success-rate display (it is ~100% in practice). - Remove
run_tests.py, the example JSON (or regenerate it fromDEFAULT_SETTINGSin a test), and either removerequirements.txtor make it a one-line-r requirements-lock.txt. Movecreate_icon.pytotools/. - Replace
performance_metricswith a small dataclass, then delete the click_engine mypy override; shrink the GUI override by typing theappparameter of the section builders.
Done when
make checkpasses with the overrides removed or reduced, the root holds only entry points and config, and the status bar shows per-run numbers only.
Activity