This repository provides pre-configured configurations of Ruff, a fast tool for linting and formatting Python code. The ready-made ruff.toml file makes it easy to implement uniform standards of style and code quality in your projects.
Clone the project repository using Git:
git clone https://github.com/RandomProgramm3r/Ruff-Config
Create a virtual environment using the venv
command, which allows you to isolate project dependencies:
python3 -m venv venv # Linux/MacOS
python -m venv venv # Windows
Activate the virtual environment:
source venv/bin/activate # Linux/MacOS
source venv/Scripts/activate # Windows
pip install -r requirements.txt
To integrate Ruff into your workflow, use the following commands:
# Run linting checks on all files
ruff check .
# Automatically fix all fixable lint issues
ruff check . --fix
# Format code according to Ruff’s rules
ruff format .
This repository includes a GitHub Actions workflow (.github/workflows/ruff.yml
) that on every push or pull request to main
will:
- Check out the code
- Set up Python 3.13
- Run Ruff via the official action
- Verify formatting with
ruff format --check
To customize, edit .github/workflows/ruff.yml
or adjust your ruff.toml
.