Skip to content

Fix lint errors and add PR check workflow for validation - #15

Merged
krypton-byte merged 8 commits into
masterfrom
dev
Aug 23, 2026
Merged

Fix lint errors and add PR check workflow for validation#15
krypton-byte merged 8 commits into
masterfrom
dev

Conversation

@krypton-byte

Copy link
Copy Markdown
Owner

This pull request introduces a new GitHub Actions workflow for automated quality checks, testing, type stub validation, and documentation builds, ensuring improved CI coverage. It also refactors the example bot scripts for better readability and maintainability by simplifying variable assignments and message formatting.

Continuous Integration and Quality Checks:

  • Added .github/workflows/pr-check.yml to run linting (Ruff), formatting, Python tests, type stub validation (Pyright, Mypy), and documentation builds on pull requests targeting key branches.

Code Readability and Consistency Improvements in Example Bots:

  • Refactored repeated inline expressions to variables (e.g., sender, chat) in examples/basic_bot.py, examples/group_bot.py, and examples/media_bot.py for clearer debug output and improved readability. [1] [2] [3]
  • Standardized string formatting for info and group info responses by removing unnecessary f-strings when not interpolating variables. [1] [2]
  • In examples/group_bot.py, assigned user-facing messages to variables before sending, enhancing clarity and consistency.
  • In examples/media_bot.py, assigned error messages to variables before sending and improved formatting for document sending, increasing maintainability. [1] [2] [3]## Summary

Type of Change

  • feat
  • fix
  • docs
  • refactor
  • chore
  • ci/build
  • breaking change

Checklist

  • PR title follows Conventional Commits (type(scope): summary)
  • Local checks pass (ruff, formatting, stub parity)
  • Docs updated if behavior/API changed
  • Relevant tests added/updated
  • No secrets or generated build artifacts committed

Linked Issues

Notes for Reviewer

krypton-byte and others added 8 commits August 23, 2026 12:29
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Runs on every pull request to catch issues before merge:
- Ruff lint + format check
- Pytest (build + test)
- Pyright + mypy type stub validation
- Zensical docs build validation

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Pre-commit only checks staged files, CI checks all files. Format
the entire project to prevent CI failures on PRs.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Swatinem/rust-cache caches Cargo build artifacts between runs.
First build still ~10min, subsequent builds ~2-3min.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
…extension is built

The Rust native AudioPlayer has a different API (buffer_frames, file paths)
than the Python prototype (queue_size, async iterators), causing
test_audio_player_emits_frames_and_finishes_once to fail when the
native extension is loaded.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The previous rust-cache only cached libs/whatsapp-rust/target, leaving
the root ./target (where maturin builds the PyO3 extension) uncached.
This caused full recompilation of the tryx crate on every CI run.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@krypton-byte
krypton-byte merged commit fa449bc into master Aug 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant