ruff

Lint, format, and modernize Python code with Ruff.

3|2|Updated Dec 11, 2024
One-click install
npx skills add https://github.com/PovertyAction/ipa-research-data-science-hub --skill ruff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruff
Source: https://github.com/PovertyAction/ipa-research-data-science-hub/tree/main/.claude/skills/ruff
Command: npx skills add https://github.com/PovertyAction/ipa-research-data-science-hub --skill ruff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers enforce Python code quality and consistency by using Ruff for linting, formatting, and modernization.

Core Features & Use Cases

  • Linting: check Python code against Ruff's extensive rule set to identify issues and improvements.
  • Formatting: auto-format Python code to a clean, consistent style.
  • Auto-fix & modernization: apply safe, automatic fixes and modernize syntax where appropriate.
  • Use Case: Integrate Ruff into pre-commit hooks or CI pipelines to ensure code quality before merges.

Quick Start

Run ruff check to lint your Python code and ruff format to apply fixes, then review remaining issues before committing.

Frequently Asked Questions about ruff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I lint and format Python code in a CI pipeline?

You can lint and format Python code in CI pipelines by running ruff check to identify issues and ruff format to apply automatic fixes, ensuring code quality before merges.

What is the best way to automate Python code quality checks for large projects?

Automating Python code quality for large projects involves integrating a fast linter and formatter like ruff into pre-commit hooks and CI pipelines to enforce consistent style and modernize syntax safely.

How do I configure Python linting rules using pyproject.toml?

You can configure Python linting rules, import sorting, and formatting behavior by defining your settings directly within pyproject.toml or Ruff’s dedicated configuration files.

Does Ruff support auto-fixing and modernizing Python syntax?

Yes, Ruff supports auto-fixing and modernizing Python syntax by applying safe, automatic fixes to identified linting issues and upgrading code style during the formatting process.

Can I use Ruff for both static analysis and import sorting in local development?

Yes, you can use Ruff for static analysis and import sorting in local development by running ruff check across your Python project to identify code improvements and organize imports.