Add tests, pre-commit hooks, CI, and refactor for pylint 10/10 #1

Merged
maks merged 4 commits from feat/tests-linting-ci into master 2026-03-31 19:35:48 +02:00
Owner
  • Add 141 tests across parser, db, pricing, and scraper modules
  • Add pre-commit hooks (black, isort, pylint) excluding tests/
  • Add Forgejo Actions CI with format, lint, and test jobs
  • Refactor all source modules to pass pylint with no suppressions:
    • Extract helper functions to reduce complexity (locals/branches/args)
    • Narrow exception handling from broad Exception to specific types
    • Use context dicts and dispatch tables to reduce argument counts
    • Add docstrings to all public modules, classes, and methods
    • Move imports to top level, remove unused imports
  • Configure isort with black-compatible profile

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

- Add 141 tests across parser, db, pricing, and scraper modules - Add pre-commit hooks (black, isort, pylint) excluding tests/ - Add Forgejo Actions CI with format, lint, and test jobs - Refactor all source modules to pass pylint with no suppressions: - Extract helper functions to reduce complexity (locals/branches/args) - Narrow exception handling from broad Exception to specific types - Use context dicts and dispatch tables to reduce argument counts - Add docstrings to all public modules, classes, and methods - Move imports to top level, remove unused imports - Configure isort with black-compatible profile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 141 tests across parser, db, pricing, and scraper modules
- Add pre-commit hooks (black, isort, pylint) excluding tests/
- Add Forgejo Actions CI with format, lint, and test jobs
- Refactor all source modules to pass pylint with no suppressions:
  - Extract helper functions to reduce complexity (locals/branches/args)
  - Narrow exception handling from broad Exception to specific types
  - Use context dicts and dispatch tables to reduce argument counts
  - Add docstrings to all public modules, classes, and methods
  - Move imports to top level, remove unused imports
- Configure isort with black-compatible profile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix CI triggers: add master to branch list
Some checks failed
CI / Format Check (pull_request) Failing after 49s
CI / Lint (pull_request) Failing after 23s
CI / Tests (pull_request) Failing after 20s
02df9480f6
The default branch is master, not main. Without master in the
trigger list, PRs targeting master won't run CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maks force-pushed feat/tests-linting-ci from 02df9480f6
Some checks failed
CI / Format Check (pull_request) Failing after 49s
CI / Lint (pull_request) Failing after 23s
CI / Tests (pull_request) Failing after 20s
to b302ae23a8
Some checks failed
CI / Format Check (pull_request) Failing after 23s
CI / Lint (pull_request) Failing after 22s
CI / Tests (pull_request) Failing after 23s
2026-03-31 17:38:50 +02:00
Compare
Use native runner with system Python instead of setup-python
Some checks failed
CI / Format Check (pull_request) Failing after 1s
CI / Lint (pull_request) Failing after 1s
CI / Tests (pull_request) Failing after 2s
8b4e35e4af
The self-hosted runner now has Python 3.13 via pyenv. Drop
actions/setup-python and use runs-on: native to run directly
on the host.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maks force-pushed feat/tests-linting-ci from 8b4e35e4af
Some checks failed
CI / Format Check (pull_request) Failing after 1s
CI / Lint (pull_request) Failing after 1s
CI / Tests (pull_request) Failing after 2s
to 96b60264be
Some checks failed
CI / Format Check (pull_request) Failing after 1s
CI / Lint (pull_request) Failing after 5s
CI / Tests (pull_request) Failing after 2s
2026-03-31 19:27:12 +02:00
Compare
Replace actions/checkout with git clone for native runner
Some checks failed
CI / Format Check (pull_request) Failing after 17s
CI / Lint (pull_request) Has been cancelled
CI / Tests (pull_request) Has been cancelled
20491dcc27
The native runner has no Node.js, which actions/checkout@v4
requires. Use git clone directly instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pin black target-version to py313
All checks were successful
CI / Format Check (pull_request) Successful in 8s
CI / Lint (pull_request) Successful in 1m8s
CI / Tests (pull_request) Successful in 26s
a0f3d6c730
Black on Python 3.13 cannot safety-check code formatted for 3.14.
Set target-version in pyproject.toml and reformat affected test files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maks merged commit 938bf12763 into master 2026-03-31 19:35:48 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
maks/avtonet-monitor!1
No description provided.