Skip to main content
We use Ruff to ensure our Python code is clean, consistent, and follows best practices. Ruff replaces multiple tools like Flake8, Black, and isort with a single, extremely fast executable.

Installation

Ruff is included in the project’s development dependencies. Install the project’s dependencies with:

Usage

Linting (Checking for errors)

To check the entire project for linting errors and logical issues, run:
If you want Ruff to automatically fix safe violations (like unused imports), use:

Formatting (Code style)

We follow a strict formatting standard. To automatically format your code to match the project style:
Running ruff format . before submitting a Pull Request is highly recommended to avoid CI failures related to code style.

Configuration

Our linting and formatting rules are defined in pyproject.toml. We follow PEP 8 standards with a target version of Python 3.12 and a line-length limit of 88 characters. Key configuration details:
  • Target Version: py312 (Python 3.12).
  • Line Length: 88 characters (matching the Black code style).
  • Selected Rules:
    • E/W: Pycodestyle errors and warnings.
    • F: Pyflakes checks.
    • I: Isort for automated import sorting.
  • Import Sorting: combine-as-imports is enabled to keep imports concise.
Install the Mintlify CLI to preview documentation locally, test changes in real time, and catch build errors.

How to Contribute

Report bugs, suggest features, and help improve the modular Discord music bot project.

Testing with Pytest & Strategies

Customize environment variables, Lavalink connection settings, and bot permissions.

Lavalink Setup

Deep-dive into running and tuning the Lavalink Docker node.

Playback Commands

Full reference for every slash command the bot exposes.