Commit Graph

571 Commits

Author SHA1 Message Date
50fd6812d7 refactor: enforce 500-line limit on all Python source files
Split 18+ Python files that exceeded 500 lines into smaller modules
with helper files (prefixed with _). All functions are re-exported
from the original modules to maintain backward compatibility with
test patches and external imports.

Files split:
- moviepy_showcase.py (1212 -> 302 + 3 helpers)
- anki_generator.py (1174 -> 473 + 4 helpers)
- test_analyze_chess_game.py (1152 -> 361 + 2 parts)
- poker_modifier_app.py (1024 -> 263 + 2 helpers)
- transcribe_fw.py (1007 -> 342 + 3 helpers)
- music_generator.py (1002 -> 319 + 2 helpers)
- translator.py (951 -> 442 + 2 helpers)
- cinema_planner.py (893 -> 369 + 2 helpers)
- lichess_bot/main.py (757 -> 495 + _game_logic.py)
- test_translator.py (725 -> 289 + part2 + conftest)
- test_lichess_api.py (680 -> 475 + part2)
- learning_pipe.py (668 -> 375 + 2 helpers)
- cache.py (655 -> 360 + _cache_decks.py)
- analyze_chess_game.py (632 -> 463 + _move_analysis.py)
- visualize_q02.py (609 -> 371 + helper)
- repo_explorer.py (602 -> 347 + 2 helpers)
- keyboard_coop/main.py (515 -> 416 + _dictionary.py)
- scanning.py (501 -> 314 + _enforce_loop.py)

All tests pass: 144 lichess_bot (100% branch coverage), 243 others.
No new lint errors introduced.
2026-03-17 22:47:42 +01:00
c4225496d3 fix(steam_backlog_enforcer): reload state in enforce loop, use steam:// protocol for installs
The enforce daemon loaded state once at startup and never reloaded it.
When the CLI reassigned a game (e.g. via 'done'), the daemon kept
enforcing the old assignment and deleted the newly assigned game every
3 seconds as 'unauthorized'.

Fix: reload state from disk at the top of each enforce loop iteration
so CLI changes take effect within one cycle.

Also add steam://install protocol handler for interactive installs
(via xdg-open) so Steam determines the correct installdir from its
own metadata, avoiding 'Missing game executable' errors from guessed
directory names in fabricated appmanifests.
2026-03-17 21:48:33 +01:00
c985160d17 WIP: Enforce 500-line limit - split batch 1
Split 16+ files. 27 files still need splitting. See session notes.
2026-03-16 22:46:48 +01:00
e51c12dd8e feat: puzzle solver algorithm 2026-03-16 19:49:52 +01:00
8998883a6c feat: add auto-close suspension for digital wellbeing
Add is_autoclose_suspended() function that checks for a per-app
suspend file dated today. When suspended, launches the app directly
without the auto-close timer via exec.
2026-03-15 19:15:38 +01:00
11a5574011 feat: add per-app timeout overrides for digital wellbeing
Allow specific apps (beeper, signal-desktop) to have longer
auto-close timeouts (20min) than the default (10min).
2026-03-14 17:52:38 +01:00
a82dfaa79f chore: update pyproject.toml per-file-ignores
- Remove per-file-ignores for cinema_planner, word_frequency, linux_configuration
- Add PT019 to test file ignores
- Add S310 for geo_data.py and library_hider.py (urlopen with validated schemes)
- Add PLC0415 for brother_printer (optional pyusb imports)
- Remove BLE001 ignores (all blind exceptions now fixed)
2026-03-14 17:52:20 +01:00
e7d2ecabb1 fix: resolve remaining ruff violations (FURB110, PLC0207)
- generate_blunder_tests.py: use 'or' instead of ternary (FURB110)
- music_generator.py: use 'or' instead of ternary (FURB110), fix type: ignore
- random_digits.py: use rsplit with maxsplit instead of split (PLC0207)
2026-03-14 17:51:55 +01:00
a77fd7f0fd refactor(praca/generate_images): fix ruff violations in generate_q23_diagrams.py 2026-03-14 17:47:32 +01:00
fe3cba03cd refactor(praca/generate_images): fix ruff violations in generate_process_diagrams.py 2026-03-14 17:28:21 +01:00
21d501bed4 refactor(praca/generate_images): fix ruff violations in generate_q24_diagrams.py 2026-03-14 17:15:35 +01:00
183f9bbc19 refactor(praca/generate_images): fix ruff violations in generate_arch_diagrams.py 2026-03-14 17:07:01 +01:00
21781d547e refactor(praca/generate_images): fix ruff violations in generate_q9_q12_diagrams.py 2026-03-14 16:38:10 +01:00
33f5c957df refactor(praca/generate_images): fix ruff violations in generate_q9_all_diagrams.py 2026-03-14 16:28:34 +01:00
9b4e9722f0 refactor(praca/generate_images): fix ruff violations in generate_study_diagrams.py 2026-03-14 16:19:59 +01:00
1721275423 refactor(praca/generate_images): fix ruff violations in generate_q20_diagrams.py 2026-03-14 16:04:14 +01:00
9041e87d32 refactor(praca/generate_images): fix ruff violations in generate_scheduling_diagrams.py 2026-03-14 15:51:02 +01:00
7c47befe04 refactor(praca/generate_images): fix ruff violations in diagram generators batch 1 2026-03-14 14:29:54 +01:00
03409b6839 refactor(praca): fix ruff violations in visualize scripts 2026-03-14 14:29:18 +01:00
d488c87203 refactor(praca_magisterska_video): fix ruff violations and remove noqa from diagram generators
- Add type annotations, docstrings, and constants
- Remove commented-out code and print statements
- Fix all lint issues in 11 generate_images files
2026-03-13 20:52:27 +01:00
1e108d1e3f refactor(tests): remove noqa comments from test files
- Fix lint issues in keyboard_coop, lichess_bot, and tag_divider tests
- Prefix unused parameters with underscore instead of noqa: ARG002
2026-03-13 20:49:25 +01:00
0d47f77ee5 refactor: remove noqa comments from miscellaneous scripts
- Fix underlying lint issues instead of suppressing with noqa
- Files: moviepy_showcase, pomodoro-wake-daemon, brother_printer,
  http_status_anki, geo_data, repo_explorer, steam_backlog_enforcer,
  music_generator
2026-03-13 20:48:40 +01:00
078a4c0071 refactor(anki_decks): remove all noqa comments and fix underlying issues
- Replace module-level globals with _mp_state dict (PLW0603)
- Use hashlib.sha256 instead of md5 (S324)
- Use secrets.randbelow instead of random.randrange (S311)
- Use tempfile.gettempdir() instead of hardcoded /tmp (S108)
- Replace assert statements with RuntimeError (S101)
2026-03-13 20:47:52 +01:00
8623276339 refactor(screen_locker): remove all noqa comments from tests
- Prefix unused mock parameters with underscore instead of noqa: ARG002
- Remove 102 noqa suppression comments
2026-03-13 20:46:45 +01:00
4d3da460fc refactor(linux_configuration): fix ruff violations in digital wellbeing and transcription scripts
- Add type annotations and docstrings to focus_mode_daemon.py, transcribe_fw.py, transcribe_helpers.py
- Use logging module instead of print
- Fix bare except clauses with specific exception types
2026-03-13 20:42:39 +01:00
0460f3fac6 refactor(word_frequency): fix all ruff violations and remove noqa comments
- Replace print() with logging module throughout
- Add type annotations and Google docstrings to all functions
- Introduce DeckInput and LessonConfig dataclasses to reduce function parameters
- Use specific exception types instead of bare except (BLE001)
- Remove all noqa suppression comments
- Fix test fixtures: remove unused _capsys/_tmp_path parameters
2026-03-13 20:41:31 +01:00
5cd30db5a2 refactor(cinema_planner): fix all ruff violations, add type hints, docstrings, logging
- Replace print() with logging module
- Add type annotations to all functions
- Add Google-style docstrings to all public functions/classes
- Extract magic numbers into named constants
- Break complex functions into smaller helpers
- Use Path.open() instead of open()
- Use contextlib.suppress where appropriate
2026-03-13 20:35:21 +01:00
cffd445b0b docs: add repository README 2026-03-13 19:47:11 +01:00
KRZYSZTOF RUDNICKI
89a8d57971 Merge branch 'main' of https://github.com/kuhyx/testsAndMisc 2026-03-12 08:50:22 +01:00
ee68d47a4c feat: improvements in hosts bluetooth focus mode and backglog scripts 2026-03-11 20:47:03 +01:00
KRZYSZTOF RUDNICKI
1a32d8dc51 Merge branch 'main' of https://github.com/kuhyx/testsAndMisc 2026-03-11 08:51:39 +01:00
KRZYSZTOF RUDNICKI
24be13a17a feat: install code insiders fix ubuntu performance gif to square and upgrae ubuntu script 2026-03-11 08:51:32 +01:00
497dcfd8b3 feat: screen replay feature 2026-03-09 18:52:48 +01:00
7fa2019124 Merge branch 'main' of https://github.com/kuhyx/testsAndMisc 2026-03-09 18:36:54 +01:00
de98faafc9 feat: robotgo improvements in phone focus bluetooth and printer scripts 2026-03-09 18:34:15 +01:00
43f5ef321d feat: better screen lock checker 2026-03-08 21:39:39 +01:00
f4b77e51dc feat: improvements in steam backlog and brother printer 2026-03-04 22:40:49 +01:00
e76c2c68ee feat: steam 100 percent extension 2026-03-02 20:29:32 +01:00
253b327b72 fix: bluetooth optimze arch desktop phone foucs mode and no secres 2026-03-02 19:13:22 +01:00
bf4a8ce173 refactor: move home coordinates to gitignored secrets file 2026-03-02 12:57:34 +01:00
3f5d57871f refactor: auto-detect wireless ADB device, remove phone_config.txt
- Replace stored phone_config.txt with _get_wireless_serial() which
  parses 'adb devices' and auto-picks the ip:port (wireless) entry
- Replace _scan_phone_port-based reconnect with _try_wireless_reconnect
  that scans local /24 subnet on port 5555 via parallel probing
- Add _get_local_subnet_prefix() using UDP socket trick (8.8.8.8:80)
- Remove PHONE_CONFIG_FILE, _load_phone_config, _save_phone_config,
  _save_connected_device_config, _scan_phone_port
- No config file needed; device is always discovered dynamically
- 112 tests passing
2026-02-24 21:19:47 +01:00
64a382e82c feat: screen locker phone check at startup with background thread
- ADB check runs in background thread (ThreadPoolExecutor) so the UI
  remains responsive while checking StrongLifts on the phone
- Poll result every 500ms via root.after instead of blocking main thread
- Show success screen for 1.5s before auto-unlocking when verified
- Target specific ADB device via -s flag using saved phone_config.txt
  to avoid errors when multiple devices (USB + wireless) are connected
- Demo mode uses local grab_set() instead of grab_set_global() so it
  works alongside other fullscreen apps
- Stub _start_phone_check in create_locker to prevent background threads
  leaking into unrelated tests (fixes flaky test_run_adb_success)
- 112 tests passing, 100% branch coverage
2026-02-24 21:11:05 +01:00
192c91094e feat: screen locker made even stronger 2026-02-23 22:50:42 +01:00
2a8d61088b chore: added delio option 2026-02-23 22:09:52 +01:00
720a291388 leechblock: switch defaults to gist JSON, seed LevelDB directly, block unsupported browsers
- Replace leechblock_defaults.js with LeechBlockOptions.json fetched from
  private gist (30 block sets, 1568 keys)
- Add seed_leechblock_storage.js: writes settings directly into Chrome's
  LevelDB via classic-level, bypassing content-verification entirely
  - Supports both .json and legacy .js defaults files
  - Chunked writes (individual db.put) to avoid batch size limits
  - Per-profile error isolation; Thorium LevelDB warning demoted to non-fatal
- Add package.json (type:module + classic-level dep) and .gitignore for
  node_modules
- install_leechblock.sh: drop background.js patching, call seeder instead;
  auto-installs classic-level if node_modules absent
- install_pacman_wrapper.sh: deploy .json defaults, seeder, and package.json
  to /usr/local/share/digital_wellbeing; run npm install there
- pacman_blocked_keywords.txt: add browsers not handled by install script
  (Microsoft Edge family, firefox-esr/nightly, opera-beta/dev,
  iridium, slimjet, chromium-dev, qutebrowser, midori)
2026-02-23 22:00:31 +01:00
21c9180b00 feat: optimized isbn number calculations 2026-02-22 22:19:28 +01:00
cc8cc53dfb feat: added run sh and makefile scripts 2026-02-22 22:00:50 +01:00
f4f25821e5 feat: shell scripts 2026-02-22 16:57:36 +01:00
265488a478 feat: added scripts for generating images for praca magisterska obrona 2026-02-22 13:08:14 +01:00
e44661f381 fix bluetooth script 2026-02-21 21:06:41 +01:00