Commit Graph

13 Commits

Author SHA1 Message Date
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
cc8cc53dfb feat: added run sh and makefile scripts 2026-02-22 22:00:50 +01:00
f28bb77df1 feat: brother printer checker 2026-02-06 21:21:52 +01:00
a58568faa6 feat: some improvemnets to http cat anki 2026-01-18 14:35:41 +01:00
Copilot
652e86c370 Add HTTP status code Anki deck generator with http.cat images (#3)
* Initial plan

* Add HTTP status code Anki deck generator with cat images

Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>

* Address code review feedback: improve test parameter handling

Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>
2026-01-14 21:52:20 +01:00
5ef944abc9 Add tests for multiple python_pkg modules
- download_cats: Test generate_cats functionality (100% coverage)
- keyboard_coop: Test keyboard_listener with mocked pynput (22% coverage)
- mock_server: Test mitmproxy request interceptor (100% coverage)
- random_jpg: Test JPEG generation with mocked Pillow (100% coverage)
- randomize_numbers: Test random_digits functions (99% coverage)
- scrape_website: Test scrape_comics with mocked requests (98% coverage)
- split: Test text splitting utilities (100% coverage)
- tag_divider: Test tag_divider with mock filesystem (44% coverage)
- extract_links: Add HTML fixture for tests
2025-12-01 19:49:44 +01:00
81d6dd5315 fix: enable all pylint checks by wrapping scripts in main()
- Remove too-few-public-methods and invalid-name from disabled checks
- Wrap module-level code in main() functions:
  - generate_jpeg.py
  - random_digits.py
  - generate_cats.py
  - scrape_comics.py
- Rename download_image -> _download_image (private function)

Pylint score: 10.00/10 with all checks enabled
2025-12-01 16:15:03 +01:00
0e73b27d50 fix: address all pylint warnings
- R0914 (too many locals): Extract helper functions in generate_jpeg.py,
  engine.py, lichess_api.py, main.py
- R0902 (too many instance attributes): Use dataclasses in keyboard_coop
- W0621 (redefined outer name): Rename parameters/variables to avoid shadowing
- W0201 (attribute outside init): Initialize all attrs in __init__
- R1705 (no-else-return): Remove unnecessary else after return
- C1805 (implicit booleaness): Use implicit boolean checks
- R1732 (consider-using-with): Use context manager for subprocess.Popen
- E0401 (import-error): Add pylint disable for optional deps (selenium, mitmproxy)
- Clean up pyproject.toml: update comments, remove redundant settings

Pylint score: 10.00/10
2025-12-01 16:11:15 +01:00
8ecc13cb56 fix(lint): fix G004 and PTH123 violations across codebase
- Convert f-string logging to % style (G004)
- Convert open() to Path.open() (PTH123)
- Remove G004 and PTH123 from global ignores in pyproject.toml
2025-11-30 23:57:49 +01:00
d22619b483 fix(lint): convert os.path to pathlib - remove PTH per-file ignores
- Converted os.path patterns to pathlib.Path in 15+ files
- os.path.join → Path /
- os.path.dirname → Path.parent
- os.path.exists → Path.exists()
- os.path.isfile → Path.is_file()
- os.path.abspath → Path.resolve()
- os.mkdir → Path.mkdir()
- os.listdir → Path.iterdir()
- os.getcwd → Path.cwd()
- os.replace → Path.replace()
- Updated function type hints to accept str | Path

Added PTH123 (open() vs Path.open()) to global ignores as stylistic preference
2025-11-30 23:03:03 +01:00
b1a5f245a2 fix(lint): LOG015 - replace root logger with module loggers
- Add _logger = logging.getLogger(__name__) to all modules
- Replace logging.X() calls with _logger.X() calls
- Remove logging.basicConfig() from module level (keep in run_bot())
- Add G004 to global ignores (f-strings in logging are more readable)
- Remove LOG015 and G004 per-file ignores from pyproject.toml
- Fix pytest_ignore_collect hook signature in conftest.py
2025-11-30 21:59:24 +01:00
b78f02cf05 fix: resolve PERF203 try-except in loop violations
- Extract try-except bodies into helper functions:
  - download_cats: _download_single_image()
  - randomize_numbers: _parse_single_number()
  - lichess_bot/main: _apply_move_to_board(), _process_event_stream(), _run_event_loop_iteration()
- Use else block for return statements after try (TRY300)
- Remove PERF203 from per-file ignores in pyproject.toml
2025-11-30 21:29:03 +01:00
2dd4e68edb refactor: rename folders to fix N999, INP001, S311 linting rules
- Rename PYTHON/ to python_pkg/ (fix N999 uppercase folder)
- Rename camelCase folders to snake_case:
  - randomJPG -> random_jpg
  - tagDivider -> tag_divider
  - downloadCats -> download_cats
  - keyboardCoop -> keyboard_coop
  - extractLinks -> extract_links
  - scapeWebsite -> scrape_website
- Rename camelCase files:
  - generateJpeg.py -> generate_jpeg.py
  - tagDivider.py -> tag_divider.py
- Rename poker-modifier-app to poker_modifier_app (fix INP001)
- Add __init__.py to poker_modifier_app
- Replace random module with secrets.SystemRandom (fix S311)
- Fix S110 try-except-pass with contextlib.suppress
- Update all imports and config references
2025-11-30 21:20:17 +01:00