zigai/rattle

GitHub: zigai/rattle

Stars: 0 | Forks: 0

# Rattle [![Tests](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/540ef4a5e6131530.svg)](https://github.com/zigai/rattle/actions/workflows/tests.yml) [![PyPI version](https://badge.fury.io/py/rattle-lint.svg)](https://badge.fury.io/py/rattle-lint) ![Supported versions](https://img.shields.io/badge/python-3.10+-blue.svg) [![Downloads](https://static.pepy.tech/badge/rattle-lint)](https://pepy.tech/project/rattle-lint) [![license](https://img.shields.io/github/license/zigai/rattle.svg)](https://github.com/zigai/rattle/blob/main/LICENSE) Rattle is a fork of [Fixit](https://github.com/Instagram/Fixit). ## Features - Built-in lint rules for common Python issues - Autofix support when a rule can safely rewrite code - Local custom rules that can live inside your repository - Hierarchical `pyproject.toml` configuration - Pre-commit integration for CI and local workflows - LSP support ## Install Install the CLI from PyPI: pip install rattle-lint pip install "rattle-lint[lsp]" ## Basic Usage Rattle runs with no enabled rules until a project enables them in `pyproject.toml`: [tool.rattle] enable = ["fixit"] rattle lint Apply available autofixes: rattle fix ## Example Configuration [tool.rattle] root = true enable = ["fixit"] python-version = "3.10" output-format = "rattle" disable = [ "NoStaticIfCondition", "UseLintFixmeComment", ] per-file-disable = {"tests/generated.py" = ["NoNamedTuple"]} [[tool.rattle.overrides]] path = "legacy" enable = ["fixit_extra"] [[tool.rattle.overrides]] path = "tests" enable = ["NoNamedTuple"] ## License MIT