ruff


Nameruff JSON
Version 0.4.9 PyPI version JSON
download
home_pagehttps://docs.astral.sh/ruff
SummaryAn extremely fast Python linter and code formatter, written in Rust.
upload_time2024-06-14 15:19:30
maintainerNone
docs_urlNone
authorCharlie Marsh <charlie.r.marsh@gmail.com>
requires_python>=3.7
licenseMIT
keywords automation flake8 pycodestyle pyflakes pylint clippy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- Begin section: Overview -->

# Ruff

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![image](https://img.shields.io/pypi/v/ruff.svg)](https://pypi.python.org/pypi/ruff)
[![image](https://img.shields.io/pypi/l/ruff.svg)](https://github.com/astral-sh/ruff/blob/main/LICENSE)
[![image](https://img.shields.io/pypi/pyversions/ruff.svg)](https://pypi.python.org/pypi/ruff)
[![Actions status](https://github.com/astral-sh/ruff/workflows/CI/badge.svg)](https://github.com/astral-sh/ruff/actions)
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white)](https://discord.com/invite/astral-sh)

[**Docs**](https://docs.astral.sh/ruff/) | [**Playground**](https://play.ruff.rs/)

An extremely fast Python linter and code formatter, written in Rust.

<p align="center">
  <img alt="Shows a bar chart with benchmark results." src="https://user-images.githubusercontent.com/1309177/232603516-4fb4892d-585c-4b20-b810-3db9161831e4.svg">
</p>

<p align="center">
  <i>Linting the CPython codebase from scratch.</i>
</p>

- ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black)
- 🐍 Installable via `pip`
- 🛠️ `pyproject.toml` support
- 🤝 Python 3.13 compatibility
- ⚖️ Drop-in parity with [Flake8](https://docs.astral.sh/ruff/faq/#how-does-ruff-compare-to-flake8), isort, and Black
- 📦 Built-in caching, to avoid re-analyzing unchanged files
- 🔧 Fix support, for automatic error correction (e.g., automatically remove unused imports)
- 📏 Over [800 built-in rules](https://docs.astral.sh/ruff/rules/), with native re-implementations
    of popular Flake8 plugins, like flake8-bugbear
- ⌨️ First-party [editor integrations](https://docs.astral.sh/ruff/integrations/) for
    [VS Code](https://github.com/astral-sh/ruff-vscode) and [more](https://github.com/astral-sh/ruff-lsp)
- 🌎 Monorepo-friendly, with [hierarchical and cascading configuration](https://docs.astral.sh/ruff/configuration/#pyprojecttoml-discovery)

Ruff aims to be orders of magnitude faster than alternative tools while integrating more
functionality behind a single, common interface.

Ruff can be used to replace [Flake8](https://pypi.org/project/flake8/) (plus dozens of plugins),
[Black](https://github.com/psf/black), [isort](https://pypi.org/project/isort/),
[pydocstyle](https://pypi.org/project/pydocstyle/), [pyupgrade](https://pypi.org/project/pyupgrade/),
[autoflake](https://pypi.org/project/autoflake/), and more, all while executing tens or hundreds of
times faster than any individual tool.

Ruff is extremely actively developed and used in major open-source projects like:

- [Apache Airflow](https://github.com/apache/airflow)
- [Apache Superset](https://github.com/apache/superset)
- [FastAPI](https://github.com/tiangolo/fastapi)
- [Hugging Face](https://github.com/huggingface/transformers)
- [Pandas](https://github.com/pandas-dev/pandas)
- [SciPy](https://github.com/scipy/scipy)

...and [many more](#whos-using-ruff).

Ruff is backed by [Astral](https://astral.sh). Read the [launch post](https://astral.sh/blog/announcing-astral-the-company-behind-ruff),
or the original [project announcement](https://notes.crmarsh.com/python-tooling-could-be-much-much-faster).

## Testimonials

[**Sebastián Ramírez**](https://twitter.com/tiangolo/status/1591912354882764802), creator
of [FastAPI](https://github.com/tiangolo/fastapi):

> Ruff is so fast that sometimes I add an intentional bug in the code just to confirm it's actually
> running and checking the code.

[**Nick Schrock**](https://twitter.com/schrockn/status/1612615862904827904), founder of [Elementl](https://www.elementl.com/),
co-creator of [GraphQL](https://graphql.org/):

> Why is Ruff a gamechanger? Primarily because it is nearly 1000x faster. Literally. Not a typo. On
> our largest module (dagster itself, 250k LOC) pylint takes about 2.5 minutes, parallelized across 4
> cores on my M1. Running ruff against our _entire_ codebase takes .4 seconds.

[**Bryan Van de Ven**](https://github.com/bokeh/bokeh/pull/12605), co-creator
of [Bokeh](https://github.com/bokeh/bokeh/), original author
of [Conda](https://docs.conda.io/en/latest/):

> Ruff is ~150-200x faster than flake8 on my machine, scanning the whole repo takes ~0.2s instead of
> ~20s. This is an enormous quality of life improvement for local dev. It's fast enough that I added
> it as an actual commit hook, which is terrific.

[**Timothy Crosley**](https://twitter.com/timothycrosley/status/1606420868514877440),
creator of [isort](https://github.com/PyCQA/isort):

> Just switched my first project to Ruff. Only one downside so far: it's so fast I couldn't believe
> it was working till I intentionally introduced some errors.

[**Tim Abbott**](https://github.com/astral-sh/ruff/issues/465#issuecomment-1317400028), lead
developer of [Zulip](https://github.com/zulip/zulip):

> This is just ridiculously fast... `ruff` is amazing.

<!-- End section: Overview -->

## Table of Contents

For more, see the [documentation](https://docs.astral.sh/ruff/).

1. [Getting Started](#getting-started)
1. [Configuration](#configuration)
1. [Rules](#rules)
1. [Contributing](#contributing)
1. [Support](#support)
1. [Acknowledgements](#acknowledgements)
1. [Who's Using Ruff?](#whos-using-ruff)
1. [License](#license)

## Getting Started

For more, see the [documentation](https://docs.astral.sh/ruff/).

### Installation

Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI:

```shell
pip install ruff
```

You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),
and with [a variety of other package managers](https://docs.astral.sh/ruff/installation/).

### Usage

To run Ruff as a linter, try any of the following:

```shell
ruff check                          # Lint all files in the current directory (and any subdirectories).
ruff check path/to/code/            # Lint all files in `/path/to/code` (and any subdirectories).
ruff check path/to/code/*.py        # Lint all `.py` files in `/path/to/code`.
ruff check path/to/code/to/file.py  # Lint `file.py`.
ruff check @arguments.txt           # Lint using an input file, treating its contents as newline-delimited command-line arguments.
```

Or, to run Ruff as a formatter:

```shell
ruff format                          # Format all files in the current directory (and any subdirectories).
ruff format path/to/code/            # Format all files in `/path/to/code` (and any subdirectories).
ruff format path/to/code/*.py        # Format all `.py` files in `/path/to/code`.
ruff format path/to/code/to/file.py  # Format `file.py`.
ruff format @arguments.txt           # Format using an input file, treating its contents as newline-delimited command-line arguments.
```

Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit):

```yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
  # Ruff version.
  rev: v0.4.9
  hooks:
    # Run the linter.
    - id: ruff
      args: [ --fix ]
    # Run the formatter.
    - id: ruff-format
```

Ruff can also be used as a [VS Code extension](https://github.com/astral-sh/ruff-vscode) or
alongside any other editor through the [Ruff LSP](https://github.com/astral-sh/ruff-lsp).

Ruff can also be used as a [GitHub Action](https://github.com/features/actions) via
[`ruff-action`](https://github.com/chartboost/ruff-action):

```yaml
name: Ruff
on: [ push, pull_request ]
jobs:
  ruff:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: chartboost/ruff-action@v1
```

### Configuration

Ruff can be configured through a `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (see:
[_Configuration_](https://docs.astral.sh/ruff/configuration/), or [_Settings_](https://docs.astral.sh/ruff/settings/)
for a complete list of all configuration options).

If left unspecified, Ruff's default configuration is equivalent to the following `ruff.toml` file:

```toml
# Exclude a variety of commonly ignored directories.
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".git-rewrite",
    ".hg",
    ".ipynb_checkpoints",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pyenv",
    ".pytest_cache",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    ".vscode",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "site-packages",
    "venv",
]

# Same as Black.
line-length = 88
indent-width = 4

# Assume Python 3.8
target-version = "py38"

[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`)  codes by default.
select = ["E4", "E7", "E9", "F"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[format]
# Like Black, use double quotes for strings.
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
```

Note that, in a `pyproject.toml`, each section header should be prefixed with `tool.ruff`. For
example, `[lint]` should be replaced with `[tool.ruff.lint]`.

Some configuration options can be provided via dedicated command-line arguments, such as those
related to rule enablement and disablement, file discovery, and logging level:

```shell
ruff check --select F401 --select F403 --quiet
```

The remaining configuration options can be provided through a catch-all `--config` argument:

```shell
ruff check --config "lint.per-file-ignores = {'some_file.py' = ['F841']}"
```

To opt in to the latest lint rules, formatter style changes, interface updates, and more, enable
[preview mode](https://docs.astral.sh/ruff/rules/) by setting `preview = true` in your configuration
file or passing `--preview` on the command line. Preview mode enables a collection of unstable
features that may change prior to stabilization.

See `ruff help` for more on Ruff's top-level commands, or `ruff help check` and `ruff help format`
for more on the linting and formatting commands, respectively.

## Rules

<!-- Begin section: Rules -->

**Ruff supports over 800 lint rules**, many of which are inspired by popular tools like Flake8,
isort, pyupgrade, and others. Regardless of the rule's origin, Ruff re-implements every rule in
Rust as a first-party feature.

By default, Ruff enables Flake8's `F` rules, along with a subset of the `E` rules, omitting any
stylistic rules that overlap with the use of a formatter, like `ruff format` or
[Black](https://github.com/psf/black).

If you're just getting started with Ruff, **the default rule set is a great place to start**: it
catches a wide variety of common errors (like unused imports) with zero configuration.

<!-- End section: Rules -->

Beyond the defaults, Ruff re-implements some of the most popular Flake8 plugins and related code
quality tools, including:

- [autoflake](https://pypi.org/project/autoflake/)
- [eradicate](https://pypi.org/project/eradicate/)
- [flake8-2020](https://pypi.org/project/flake8-2020/)
- [flake8-annotations](https://pypi.org/project/flake8-annotations/)
- [flake8-async](https://pypi.org/project/flake8-async)
- [flake8-bandit](https://pypi.org/project/flake8-bandit/) ([#1646](https://github.com/astral-sh/ruff/issues/1646))
- [flake8-blind-except](https://pypi.org/project/flake8-blind-except/)
- [flake8-boolean-trap](https://pypi.org/project/flake8-boolean-trap/)
- [flake8-bugbear](https://pypi.org/project/flake8-bugbear/)
- [flake8-builtins](https://pypi.org/project/flake8-builtins/)
- [flake8-commas](https://pypi.org/project/flake8-commas/)
- [flake8-comprehensions](https://pypi.org/project/flake8-comprehensions/)
- [flake8-copyright](https://pypi.org/project/flake8-copyright/)
- [flake8-datetimez](https://pypi.org/project/flake8-datetimez/)
- [flake8-debugger](https://pypi.org/project/flake8-debugger/)
- [flake8-django](https://pypi.org/project/flake8-django/)
- [flake8-docstrings](https://pypi.org/project/flake8-docstrings/)
- [flake8-eradicate](https://pypi.org/project/flake8-eradicate/)
- [flake8-errmsg](https://pypi.org/project/flake8-errmsg/)
- [flake8-executable](https://pypi.org/project/flake8-executable/)
- [flake8-future-annotations](https://pypi.org/project/flake8-future-annotations/)
- [flake8-gettext](https://pypi.org/project/flake8-gettext/)
- [flake8-implicit-str-concat](https://pypi.org/project/flake8-implicit-str-concat/)
- [flake8-import-conventions](https://github.com/joaopalmeiro/flake8-import-conventions)
- [flake8-logging](https://pypi.org/project/flake8-logging/)
- [flake8-logging-format](https://pypi.org/project/flake8-logging-format/)
- [flake8-no-pep420](https://pypi.org/project/flake8-no-pep420)
- [flake8-pie](https://pypi.org/project/flake8-pie/)
- [flake8-print](https://pypi.org/project/flake8-print/)
- [flake8-pyi](https://pypi.org/project/flake8-pyi/)
- [flake8-pytest-style](https://pypi.org/project/flake8-pytest-style/)
- [flake8-quotes](https://pypi.org/project/flake8-quotes/)
- [flake8-raise](https://pypi.org/project/flake8-raise/)
- [flake8-return](https://pypi.org/project/flake8-return/)
- [flake8-self](https://pypi.org/project/flake8-self/)
- [flake8-simplify](https://pypi.org/project/flake8-simplify/)
- [flake8-slots](https://pypi.org/project/flake8-slots/)
- [flake8-super](https://pypi.org/project/flake8-super/)
- [flake8-tidy-imports](https://pypi.org/project/flake8-tidy-imports/)
- [flake8-todos](https://pypi.org/project/flake8-todos/)
- [flake8-trio](https://pypi.org/project/flake8-trio/)
- [flake8-type-checking](https://pypi.org/project/flake8-type-checking/)
- [flake8-use-pathlib](https://pypi.org/project/flake8-use-pathlib/)
- [flynt](https://pypi.org/project/flynt/) ([#2102](https://github.com/astral-sh/ruff/issues/2102))
- [isort](https://pypi.org/project/isort/)
- [mccabe](https://pypi.org/project/mccabe/)
- [pandas-vet](https://pypi.org/project/pandas-vet/)
- [pep8-naming](https://pypi.org/project/pep8-naming/)
- [pydocstyle](https://pypi.org/project/pydocstyle/)
- [pygrep-hooks](https://github.com/pre-commit/pygrep-hooks)
- [pylint-airflow](https://pypi.org/project/pylint-airflow/)
- [pyupgrade](https://pypi.org/project/pyupgrade/)
- [tryceratops](https://pypi.org/project/tryceratops/)
- [yesqa](https://pypi.org/project/yesqa/)

For a complete enumeration of the supported rules, see [_Rules_](https://docs.astral.sh/ruff/rules/).

## Contributing

Contributions are welcome and highly appreciated. To get started, check out the
[**contributing guidelines**](https://docs.astral.sh/ruff/contributing/).

You can also join us on [**Discord**](https://discord.com/invite/astral-sh).

## Support

Having trouble? Check out the existing issues on [**GitHub**](https://github.com/astral-sh/ruff/issues),
or feel free to [**open a new one**](https://github.com/astral-sh/ruff/issues/new).

You can also ask for help on [**Discord**](https://discord.com/invite/astral-sh).

## Acknowledgements

Ruff's linter draws on both the APIs and implementation details of many other
tools in the Python ecosystem, especially [Flake8](https://github.com/PyCQA/flake8), [Pyflakes](https://github.com/PyCQA/pyflakes),
[pycodestyle](https://github.com/PyCQA/pycodestyle), [pydocstyle](https://github.com/PyCQA/pydocstyle),
[pyupgrade](https://github.com/asottile/pyupgrade), and [isort](https://github.com/PyCQA/isort).

In some cases, Ruff includes a "direct" Rust port of the corresponding tool.
We're grateful to the maintainers of these tools for their work, and for all
the value they've provided to the Python community.

Ruff's formatter is built on a fork of Rome's [`rome_formatter`](https://github.com/rome/tools/tree/main/crates/rome_formatter),
and again draws on both API and implementation details from [Rome](https://github.com/rome/tools),
[Prettier](https://github.com/prettier/prettier), and [Black](https://github.com/psf/black).

Ruff's import resolver is based on the import resolution algorithm from [Pyright](https://github.com/microsoft/pyright).

Ruff is also influenced by a number of tools outside the Python ecosystem, like
[Clippy](https://github.com/rust-lang/rust-clippy) and [ESLint](https://github.com/eslint/eslint).

Ruff is the beneficiary of a large number of [contributors](https://github.com/astral-sh/ruff/graphs/contributors).

Ruff is released under the MIT license.

## Who's Using Ruff?

Ruff is used by a number of major open-source projects and companies, including:

- [Albumentations](https://github.com/albumentations-team/albumentations)
- Amazon ([AWS SAM](https://github.com/aws/serverless-application-model))
- Anthropic ([Python SDK](https://github.com/anthropics/anthropic-sdk-python))
- [Apache Airflow](https://github.com/apache/airflow)
- AstraZeneca ([Magnus](https://github.com/AstraZeneca/magnus-core))
- [Babel](https://github.com/python-babel/babel)
- Benchling ([Refac](https://github.com/benchling/refac))
- [Bokeh](https://github.com/bokeh/bokeh)
- [Cryptography (PyCA)](https://github.com/pyca/cryptography)
- CERN ([Indico](https://getindico.io/))
- [DVC](https://github.com/iterative/dvc)
- [Dagger](https://github.com/dagger/dagger)
- [Dagster](https://github.com/dagster-io/dagster)
- Databricks ([MLflow](https://github.com/mlflow/mlflow))
- [FastAPI](https://github.com/tiangolo/fastapi)
- [Godot](https://github.com/godotengine/godot)
- [Gradio](https://github.com/gradio-app/gradio)
- [Great Expectations](https://github.com/great-expectations/great_expectations)
- [HTTPX](https://github.com/encode/httpx)
- [Hatch](https://github.com/pypa/hatch)
- [Home Assistant](https://github.com/home-assistant/core)
- Hugging Face ([Transformers](https://github.com/huggingface/transformers),
    [Datasets](https://github.com/huggingface/datasets),
    [Diffusers](https://github.com/huggingface/diffusers))
- ING Bank ([popmon](https://github.com/ing-bank/popmon), [probatus](https://github.com/ing-bank/probatus))
- [Ibis](https://github.com/ibis-project/ibis)
- [ivy](https://github.com/unifyai/ivy)
- [Jupyter](https://github.com/jupyter-server/jupyter_server)
- [Kraken Tech](https://kraken.tech/)
- [LangChain](https://github.com/hwchase17/langchain)
- [Litestar](https://litestar.dev/)
- [LlamaIndex](https://github.com/jerryjliu/llama_index)
- Matrix ([Synapse](https://github.com/matrix-org/synapse))
- [MegaLinter](https://github.com/oxsecurity/megalinter)
- Meltano ([Meltano CLI](https://github.com/meltano/meltano), [Singer SDK](https://github.com/meltano/sdk))
- Microsoft ([Semantic Kernel](https://github.com/microsoft/semantic-kernel),
    [ONNX Runtime](https://github.com/microsoft/onnxruntime),
    [LightGBM](https://github.com/microsoft/LightGBM))
- Modern Treasury ([Python SDK](https://github.com/Modern-Treasury/modern-treasury-python))
- Mozilla ([Firefox](https://github.com/mozilla/gecko-dev))
- [Mypy](https://github.com/python/mypy)
- [Nautobot](https://github.com/nautobot/nautobot)
- Netflix ([Dispatch](https://github.com/Netflix/dispatch))
- [Neon](https://github.com/neondatabase/neon)
- [Nokia](https://nokia.com/)
- [NoneBot](https://github.com/nonebot/nonebot2)
- [NumPyro](https://github.com/pyro-ppl/numpyro)
- [ONNX](https://github.com/onnx/onnx)
- [OpenBB](https://github.com/OpenBB-finance/OpenBBTerminal)
- [PDM](https://github.com/pdm-project/pdm)
- [PaddlePaddle](https://github.com/PaddlePaddle/Paddle)
- [Pandas](https://github.com/pandas-dev/pandas)
- [Pillow](https://github.com/python-pillow/Pillow)
- [Poetry](https://github.com/python-poetry/poetry)
- [Polars](https://github.com/pola-rs/polars)
- [PostHog](https://github.com/PostHog/posthog)
- Prefect ([Python SDK](https://github.com/PrefectHQ/prefect), [Marvin](https://github.com/PrefectHQ/marvin))
- [PyInstaller](https://github.com/pyinstaller/pyinstaller)
- [PyMC](https://github.com/pymc-devs/pymc/)
- [PyMC-Marketing](https://github.com/pymc-labs/pymc-marketing)
- [pytest](https://github.com/pytest-dev/pytest)
- [PyTorch](https://github.com/pytorch/pytorch)
- [Pydantic](https://github.com/pydantic/pydantic)
- [Pylint](https://github.com/PyCQA/pylint)
- [PyVista](https://github.com/pyvista/pyvista)
- [Reflex](https://github.com/reflex-dev/reflex)
- [River](https://github.com/online-ml/river)
- [Rippling](https://rippling.com)
- [Robyn](https://github.com/sansyrox/robyn)
- [Saleor](https://github.com/saleor/saleor)
- Scale AI ([Launch SDK](https://github.com/scaleapi/launch-python-client))
- [SciPy](https://github.com/scipy/scipy)
- Snowflake ([SnowCLI](https://github.com/Snowflake-Labs/snowcli))
- [Sphinx](https://github.com/sphinx-doc/sphinx)
- [Stable Baselines3](https://github.com/DLR-RM/stable-baselines3)
- [Starlette](https://github.com/encode/starlette)
- [Streamlit](https://github.com/streamlit/streamlit)
- [The Algorithms](https://github.com/TheAlgorithms/Python)
- [Vega-Altair](https://github.com/altair-viz/altair)
- WordPress ([Openverse](https://github.com/WordPress/openverse))
- [ZenML](https://github.com/zenml-io/zenml)
- [Zulip](https://github.com/zulip/zulip)
- [build (PyPA)](https://github.com/pypa/build)
- [cibuildwheel (PyPA)](https://github.com/pypa/cibuildwheel)
- [delta-rs](https://github.com/delta-io/delta-rs)
- [featuretools](https://github.com/alteryx/featuretools)
- [meson-python](https://github.com/mesonbuild/meson-python)
- [nox](https://github.com/wntrblm/nox)
- [pip](https://github.com/pypa/pip)

### Show Your Support

If you're using Ruff, consider adding the Ruff badge to your project's `README.md`:

```md
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
```

...or `README.rst`:

```rst
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Ruff
```

...or, as HTML:

```html
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;"></a>
```

## License

This repository is licensed under the [MIT License](https://github.com/astral-sh/ruff/blob/main/LICENSE)

<div align="center">
  <a target="_blank" href="https://astral.sh" style="background:none">
    <img src="https://raw.githubusercontent.com/astral-sh/ruff/main/assets/svg/Astral.svg" alt="Made by Astral">
  </a>
</div>


            

Raw data

            {
    "_id": null,
    "home_page": "https://docs.astral.sh/ruff",
    "name": "ruff",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "automation, flake8, pycodestyle, pyflakes, pylint, clippy",
    "author": "Charlie Marsh <charlie.r.marsh@gmail.com>",
    "author_email": "\"Astral Software Inc.\" <hey@astral.sh>",
    "download_url": "https://files.pythonhosted.org/packages/81/53/e4e59acfc403dc93f0374f46244dd70e192d89620d6a28ca99f007b22d24/ruff-0.4.9.tar.gz",
    "platform": null,
    "description": "<!-- Begin section: Overview -->\n\n# Ruff\n\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![image](https://img.shields.io/pypi/v/ruff.svg)](https://pypi.python.org/pypi/ruff)\n[![image](https://img.shields.io/pypi/l/ruff.svg)](https://github.com/astral-sh/ruff/blob/main/LICENSE)\n[![image](https://img.shields.io/pypi/pyversions/ruff.svg)](https://pypi.python.org/pypi/ruff)\n[![Actions status](https://github.com/astral-sh/ruff/workflows/CI/badge.svg)](https://github.com/astral-sh/ruff/actions)\n[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white)](https://discord.com/invite/astral-sh)\n\n[**Docs**](https://docs.astral.sh/ruff/) | [**Playground**](https://play.ruff.rs/)\n\nAn extremely fast Python linter and code formatter, written in Rust.\n\n<p align=\"center\">\n  <img alt=\"Shows a bar chart with benchmark results.\" src=\"https://user-images.githubusercontent.com/1309177/232603516-4fb4892d-585c-4b20-b810-3db9161831e4.svg\">\n</p>\n\n<p align=\"center\">\n  <i>Linting the CPython codebase from scratch.</i>\n</p>\n\n- \u26a1\ufe0f 10-100x faster than existing linters (like Flake8) and formatters (like Black)\n- \ud83d\udc0d Installable via `pip`\n- \ud83d\udee0\ufe0f `pyproject.toml` support\n- \ud83e\udd1d Python 3.13 compatibility\n- \u2696\ufe0f Drop-in parity with [Flake8](https://docs.astral.sh/ruff/faq/#how-does-ruff-compare-to-flake8), isort, and Black\n- \ud83d\udce6 Built-in caching, to avoid re-analyzing unchanged files\n- \ud83d\udd27 Fix support, for automatic error correction (e.g., automatically remove unused imports)\n- \ud83d\udccf Over [800 built-in rules](https://docs.astral.sh/ruff/rules/), with native re-implementations\n    of popular Flake8 plugins, like flake8-bugbear\n- \u2328\ufe0f First-party [editor integrations](https://docs.astral.sh/ruff/integrations/) for\n    [VS Code](https://github.com/astral-sh/ruff-vscode) and [more](https://github.com/astral-sh/ruff-lsp)\n- \ud83c\udf0e Monorepo-friendly, with [hierarchical and cascading configuration](https://docs.astral.sh/ruff/configuration/#pyprojecttoml-discovery)\n\nRuff aims to be orders of magnitude faster than alternative tools while integrating more\nfunctionality behind a single, common interface.\n\nRuff can be used to replace [Flake8](https://pypi.org/project/flake8/) (plus dozens of plugins),\n[Black](https://github.com/psf/black), [isort](https://pypi.org/project/isort/),\n[pydocstyle](https://pypi.org/project/pydocstyle/), [pyupgrade](https://pypi.org/project/pyupgrade/),\n[autoflake](https://pypi.org/project/autoflake/), and more, all while executing tens or hundreds of\ntimes faster than any individual tool.\n\nRuff is extremely actively developed and used in major open-source projects like:\n\n- [Apache Airflow](https://github.com/apache/airflow)\n- [Apache Superset](https://github.com/apache/superset)\n- [FastAPI](https://github.com/tiangolo/fastapi)\n- [Hugging Face](https://github.com/huggingface/transformers)\n- [Pandas](https://github.com/pandas-dev/pandas)\n- [SciPy](https://github.com/scipy/scipy)\n\n...and [many more](#whos-using-ruff).\n\nRuff is backed by [Astral](https://astral.sh). Read the [launch post](https://astral.sh/blog/announcing-astral-the-company-behind-ruff),\nor the original [project announcement](https://notes.crmarsh.com/python-tooling-could-be-much-much-faster).\n\n## Testimonials\n\n[**Sebasti\u00e1n Ram\u00edrez**](https://twitter.com/tiangolo/status/1591912354882764802), creator\nof [FastAPI](https://github.com/tiangolo/fastapi):\n\n> Ruff is so fast that sometimes I add an intentional bug in the code just to confirm it's actually\n> running and checking the code.\n\n[**Nick Schrock**](https://twitter.com/schrockn/status/1612615862904827904), founder of [Elementl](https://www.elementl.com/),\nco-creator of [GraphQL](https://graphql.org/):\n\n> Why is Ruff a gamechanger? Primarily because it is nearly 1000x faster. Literally. Not a typo. On\n> our largest module (dagster itself, 250k LOC) pylint takes about 2.5 minutes, parallelized across 4\n> cores on my M1. Running ruff against our _entire_ codebase takes .4 seconds.\n\n[**Bryan Van de Ven**](https://github.com/bokeh/bokeh/pull/12605), co-creator\nof [Bokeh](https://github.com/bokeh/bokeh/), original author\nof [Conda](https://docs.conda.io/en/latest/):\n\n> Ruff is ~150-200x faster than flake8 on my machine, scanning the whole repo takes ~0.2s instead of\n> ~20s. This is an enormous quality of life improvement for local dev. It's fast enough that I added\n> it as an actual commit hook, which is terrific.\n\n[**Timothy Crosley**](https://twitter.com/timothycrosley/status/1606420868514877440),\ncreator of [isort](https://github.com/PyCQA/isort):\n\n> Just switched my first project to Ruff. Only one downside so far: it's so fast I couldn't believe\n> it was working till I intentionally introduced some errors.\n\n[**Tim Abbott**](https://github.com/astral-sh/ruff/issues/465#issuecomment-1317400028), lead\ndeveloper of [Zulip](https://github.com/zulip/zulip):\n\n> This is just ridiculously fast... `ruff` is amazing.\n\n<!-- End section: Overview -->\n\n## Table of Contents\n\nFor more, see the [documentation](https://docs.astral.sh/ruff/).\n\n1. [Getting Started](#getting-started)\n1. [Configuration](#configuration)\n1. [Rules](#rules)\n1. [Contributing](#contributing)\n1. [Support](#support)\n1. [Acknowledgements](#acknowledgements)\n1. [Who's Using Ruff?](#whos-using-ruff)\n1. [License](#license)\n\n## Getting Started\n\nFor more, see the [documentation](https://docs.astral.sh/ruff/).\n\n### Installation\n\nRuff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI:\n\n```shell\npip install ruff\n```\n\nYou can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),\nand with [a variety of other package managers](https://docs.astral.sh/ruff/installation/).\n\n### Usage\n\nTo run Ruff as a linter, try any of the following:\n\n```shell\nruff check                          # Lint all files in the current directory (and any subdirectories).\nruff check path/to/code/            # Lint all files in `/path/to/code` (and any subdirectories).\nruff check path/to/code/*.py        # Lint all `.py` files in `/path/to/code`.\nruff check path/to/code/to/file.py  # Lint `file.py`.\nruff check @arguments.txt           # Lint using an input file, treating its contents as newline-delimited command-line arguments.\n```\n\nOr, to run Ruff as a formatter:\n\n```shell\nruff format                          # Format all files in the current directory (and any subdirectories).\nruff format path/to/code/            # Format all files in `/path/to/code` (and any subdirectories).\nruff format path/to/code/*.py        # Format all `.py` files in `/path/to/code`.\nruff format path/to/code/to/file.py  # Format `file.py`.\nruff format @arguments.txt           # Format using an input file, treating its contents as newline-delimited command-line arguments.\n```\n\nRuff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit):\n\n```yaml\n- repo: https://github.com/astral-sh/ruff-pre-commit\n  # Ruff version.\n  rev: v0.4.9\n  hooks:\n    # Run the linter.\n    - id: ruff\n      args: [ --fix ]\n    # Run the formatter.\n    - id: ruff-format\n```\n\nRuff can also be used as a [VS Code extension](https://github.com/astral-sh/ruff-vscode) or\nalongside any other editor through the [Ruff LSP](https://github.com/astral-sh/ruff-lsp).\n\nRuff can also be used as a [GitHub Action](https://github.com/features/actions) via\n[`ruff-action`](https://github.com/chartboost/ruff-action):\n\n```yaml\nname: Ruff\non: [ push, pull_request ]\njobs:\n  ruff:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: chartboost/ruff-action@v1\n```\n\n### Configuration\n\nRuff can be configured through a `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (see:\n[_Configuration_](https://docs.astral.sh/ruff/configuration/), or [_Settings_](https://docs.astral.sh/ruff/settings/)\nfor a complete list of all configuration options).\n\nIf left unspecified, Ruff's default configuration is equivalent to the following `ruff.toml` file:\n\n```toml\n# Exclude a variety of commonly ignored directories.\nexclude = [\n    \".bzr\",\n    \".direnv\",\n    \".eggs\",\n    \".git\",\n    \".git-rewrite\",\n    \".hg\",\n    \".ipynb_checkpoints\",\n    \".mypy_cache\",\n    \".nox\",\n    \".pants.d\",\n    \".pyenv\",\n    \".pytest_cache\",\n    \".pytype\",\n    \".ruff_cache\",\n    \".svn\",\n    \".tox\",\n    \".venv\",\n    \".vscode\",\n    \"__pypackages__\",\n    \"_build\",\n    \"buck-out\",\n    \"build\",\n    \"dist\",\n    \"node_modules\",\n    \"site-packages\",\n    \"venv\",\n]\n\n# Same as Black.\nline-length = 88\nindent-width = 4\n\n# Assume Python 3.8\ntarget-version = \"py38\"\n\n[lint]\n# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`)  codes by default.\nselect = [\"E4\", \"E7\", \"E9\", \"F\"]\nignore = []\n\n# Allow fix for all enabled rules (when `--fix`) is provided.\nfixable = [\"ALL\"]\nunfixable = []\n\n# Allow unused variables when underscore-prefixed.\ndummy-variable-rgx = \"^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$\"\n\n[format]\n# Like Black, use double quotes for strings.\nquote-style = \"double\"\n\n# Like Black, indent with spaces, rather than tabs.\nindent-style = \"space\"\n\n# Like Black, respect magic trailing commas.\nskip-magic-trailing-comma = false\n\n# Like Black, automatically detect the appropriate line ending.\nline-ending = \"auto\"\n```\n\nNote that, in a `pyproject.toml`, each section header should be prefixed with `tool.ruff`. For\nexample, `[lint]` should be replaced with `[tool.ruff.lint]`.\n\nSome configuration options can be provided via dedicated command-line arguments, such as those\nrelated to rule enablement and disablement, file discovery, and logging level:\n\n```shell\nruff check --select F401 --select F403 --quiet\n```\n\nThe remaining configuration options can be provided through a catch-all `--config` argument:\n\n```shell\nruff check --config \"lint.per-file-ignores = {'some_file.py' = ['F841']}\"\n```\n\nTo opt in to the latest lint rules, formatter style changes, interface updates, and more, enable\n[preview mode](https://docs.astral.sh/ruff/rules/) by setting `preview = true` in your configuration\nfile or passing `--preview` on the command line. Preview mode enables a collection of unstable\nfeatures that may change prior to stabilization.\n\nSee `ruff help` for more on Ruff's top-level commands, or `ruff help check` and `ruff help format`\nfor more on the linting and formatting commands, respectively.\n\n## Rules\n\n<!-- Begin section: Rules -->\n\n**Ruff supports over 800 lint rules**, many of which are inspired by popular tools like Flake8,\nisort, pyupgrade, and others. Regardless of the rule's origin, Ruff re-implements every rule in\nRust as a first-party feature.\n\nBy default, Ruff enables Flake8's `F` rules, along with a subset of the `E` rules, omitting any\nstylistic rules that overlap with the use of a formatter, like `ruff format` or\n[Black](https://github.com/psf/black).\n\nIf you're just getting started with Ruff, **the default rule set is a great place to start**: it\ncatches a wide variety of common errors (like unused imports) with zero configuration.\n\n<!-- End section: Rules -->\n\nBeyond the defaults, Ruff re-implements some of the most popular Flake8 plugins and related code\nquality tools, including:\n\n- [autoflake](https://pypi.org/project/autoflake/)\n- [eradicate](https://pypi.org/project/eradicate/)\n- [flake8-2020](https://pypi.org/project/flake8-2020/)\n- [flake8-annotations](https://pypi.org/project/flake8-annotations/)\n- [flake8-async](https://pypi.org/project/flake8-async)\n- [flake8-bandit](https://pypi.org/project/flake8-bandit/) ([#1646](https://github.com/astral-sh/ruff/issues/1646))\n- [flake8-blind-except](https://pypi.org/project/flake8-blind-except/)\n- [flake8-boolean-trap](https://pypi.org/project/flake8-boolean-trap/)\n- [flake8-bugbear](https://pypi.org/project/flake8-bugbear/)\n- [flake8-builtins](https://pypi.org/project/flake8-builtins/)\n- [flake8-commas](https://pypi.org/project/flake8-commas/)\n- [flake8-comprehensions](https://pypi.org/project/flake8-comprehensions/)\n- [flake8-copyright](https://pypi.org/project/flake8-copyright/)\n- [flake8-datetimez](https://pypi.org/project/flake8-datetimez/)\n- [flake8-debugger](https://pypi.org/project/flake8-debugger/)\n- [flake8-django](https://pypi.org/project/flake8-django/)\n- [flake8-docstrings](https://pypi.org/project/flake8-docstrings/)\n- [flake8-eradicate](https://pypi.org/project/flake8-eradicate/)\n- [flake8-errmsg](https://pypi.org/project/flake8-errmsg/)\n- [flake8-executable](https://pypi.org/project/flake8-executable/)\n- [flake8-future-annotations](https://pypi.org/project/flake8-future-annotations/)\n- [flake8-gettext](https://pypi.org/project/flake8-gettext/)\n- [flake8-implicit-str-concat](https://pypi.org/project/flake8-implicit-str-concat/)\n- [flake8-import-conventions](https://github.com/joaopalmeiro/flake8-import-conventions)\n- [flake8-logging](https://pypi.org/project/flake8-logging/)\n- [flake8-logging-format](https://pypi.org/project/flake8-logging-format/)\n- [flake8-no-pep420](https://pypi.org/project/flake8-no-pep420)\n- [flake8-pie](https://pypi.org/project/flake8-pie/)\n- [flake8-print](https://pypi.org/project/flake8-print/)\n- [flake8-pyi](https://pypi.org/project/flake8-pyi/)\n- [flake8-pytest-style](https://pypi.org/project/flake8-pytest-style/)\n- [flake8-quotes](https://pypi.org/project/flake8-quotes/)\n- [flake8-raise](https://pypi.org/project/flake8-raise/)\n- [flake8-return](https://pypi.org/project/flake8-return/)\n- [flake8-self](https://pypi.org/project/flake8-self/)\n- [flake8-simplify](https://pypi.org/project/flake8-simplify/)\n- [flake8-slots](https://pypi.org/project/flake8-slots/)\n- [flake8-super](https://pypi.org/project/flake8-super/)\n- [flake8-tidy-imports](https://pypi.org/project/flake8-tidy-imports/)\n- [flake8-todos](https://pypi.org/project/flake8-todos/)\n- [flake8-trio](https://pypi.org/project/flake8-trio/)\n- [flake8-type-checking](https://pypi.org/project/flake8-type-checking/)\n- [flake8-use-pathlib](https://pypi.org/project/flake8-use-pathlib/)\n- [flynt](https://pypi.org/project/flynt/) ([#2102](https://github.com/astral-sh/ruff/issues/2102))\n- [isort](https://pypi.org/project/isort/)\n- [mccabe](https://pypi.org/project/mccabe/)\n- [pandas-vet](https://pypi.org/project/pandas-vet/)\n- [pep8-naming](https://pypi.org/project/pep8-naming/)\n- [pydocstyle](https://pypi.org/project/pydocstyle/)\n- [pygrep-hooks](https://github.com/pre-commit/pygrep-hooks)\n- [pylint-airflow](https://pypi.org/project/pylint-airflow/)\n- [pyupgrade](https://pypi.org/project/pyupgrade/)\n- [tryceratops](https://pypi.org/project/tryceratops/)\n- [yesqa](https://pypi.org/project/yesqa/)\n\nFor a complete enumeration of the supported rules, see [_Rules_](https://docs.astral.sh/ruff/rules/).\n\n## Contributing\n\nContributions are welcome and highly appreciated. To get started, check out the\n[**contributing guidelines**](https://docs.astral.sh/ruff/contributing/).\n\nYou can also join us on [**Discord**](https://discord.com/invite/astral-sh).\n\n## Support\n\nHaving trouble? Check out the existing issues on [**GitHub**](https://github.com/astral-sh/ruff/issues),\nor feel free to [**open a new one**](https://github.com/astral-sh/ruff/issues/new).\n\nYou can also ask for help on [**Discord**](https://discord.com/invite/astral-sh).\n\n## Acknowledgements\n\nRuff's linter draws on both the APIs and implementation details of many other\ntools in the Python ecosystem, especially [Flake8](https://github.com/PyCQA/flake8), [Pyflakes](https://github.com/PyCQA/pyflakes),\n[pycodestyle](https://github.com/PyCQA/pycodestyle), [pydocstyle](https://github.com/PyCQA/pydocstyle),\n[pyupgrade](https://github.com/asottile/pyupgrade), and [isort](https://github.com/PyCQA/isort).\n\nIn some cases, Ruff includes a \"direct\" Rust port of the corresponding tool.\nWe're grateful to the maintainers of these tools for their work, and for all\nthe value they've provided to the Python community.\n\nRuff's formatter is built on a fork of Rome's [`rome_formatter`](https://github.com/rome/tools/tree/main/crates/rome_formatter),\nand again draws on both API and implementation details from [Rome](https://github.com/rome/tools),\n[Prettier](https://github.com/prettier/prettier), and [Black](https://github.com/psf/black).\n\nRuff's import resolver is based on the import resolution algorithm from [Pyright](https://github.com/microsoft/pyright).\n\nRuff is also influenced by a number of tools outside the Python ecosystem, like\n[Clippy](https://github.com/rust-lang/rust-clippy) and [ESLint](https://github.com/eslint/eslint).\n\nRuff is the beneficiary of a large number of [contributors](https://github.com/astral-sh/ruff/graphs/contributors).\n\nRuff is released under the MIT license.\n\n## Who's Using Ruff?\n\nRuff is used by a number of major open-source projects and companies, including:\n\n- [Albumentations](https://github.com/albumentations-team/albumentations)\n- Amazon ([AWS SAM](https://github.com/aws/serverless-application-model))\n- Anthropic ([Python SDK](https://github.com/anthropics/anthropic-sdk-python))\n- [Apache Airflow](https://github.com/apache/airflow)\n- AstraZeneca ([Magnus](https://github.com/AstraZeneca/magnus-core))\n- [Babel](https://github.com/python-babel/babel)\n- Benchling ([Refac](https://github.com/benchling/refac))\n- [Bokeh](https://github.com/bokeh/bokeh)\n- [Cryptography (PyCA)](https://github.com/pyca/cryptography)\n- CERN ([Indico](https://getindico.io/))\n- [DVC](https://github.com/iterative/dvc)\n- [Dagger](https://github.com/dagger/dagger)\n- [Dagster](https://github.com/dagster-io/dagster)\n- Databricks ([MLflow](https://github.com/mlflow/mlflow))\n- [FastAPI](https://github.com/tiangolo/fastapi)\n- [Godot](https://github.com/godotengine/godot)\n- [Gradio](https://github.com/gradio-app/gradio)\n- [Great Expectations](https://github.com/great-expectations/great_expectations)\n- [HTTPX](https://github.com/encode/httpx)\n- [Hatch](https://github.com/pypa/hatch)\n- [Home Assistant](https://github.com/home-assistant/core)\n- Hugging Face ([Transformers](https://github.com/huggingface/transformers),\n    [Datasets](https://github.com/huggingface/datasets),\n    [Diffusers](https://github.com/huggingface/diffusers))\n- ING Bank ([popmon](https://github.com/ing-bank/popmon), [probatus](https://github.com/ing-bank/probatus))\n- [Ibis](https://github.com/ibis-project/ibis)\n- [ivy](https://github.com/unifyai/ivy)\n- [Jupyter](https://github.com/jupyter-server/jupyter_server)\n- [Kraken Tech](https://kraken.tech/)\n- [LangChain](https://github.com/hwchase17/langchain)\n- [Litestar](https://litestar.dev/)\n- [LlamaIndex](https://github.com/jerryjliu/llama_index)\n- Matrix ([Synapse](https://github.com/matrix-org/synapse))\n- [MegaLinter](https://github.com/oxsecurity/megalinter)\n- Meltano ([Meltano CLI](https://github.com/meltano/meltano), [Singer SDK](https://github.com/meltano/sdk))\n- Microsoft ([Semantic Kernel](https://github.com/microsoft/semantic-kernel),\n    [ONNX Runtime](https://github.com/microsoft/onnxruntime),\n    [LightGBM](https://github.com/microsoft/LightGBM))\n- Modern Treasury ([Python SDK](https://github.com/Modern-Treasury/modern-treasury-python))\n- Mozilla ([Firefox](https://github.com/mozilla/gecko-dev))\n- [Mypy](https://github.com/python/mypy)\n- [Nautobot](https://github.com/nautobot/nautobot)\n- Netflix ([Dispatch](https://github.com/Netflix/dispatch))\n- [Neon](https://github.com/neondatabase/neon)\n- [Nokia](https://nokia.com/)\n- [NoneBot](https://github.com/nonebot/nonebot2)\n- [NumPyro](https://github.com/pyro-ppl/numpyro)\n- [ONNX](https://github.com/onnx/onnx)\n- [OpenBB](https://github.com/OpenBB-finance/OpenBBTerminal)\n- [PDM](https://github.com/pdm-project/pdm)\n- [PaddlePaddle](https://github.com/PaddlePaddle/Paddle)\n- [Pandas](https://github.com/pandas-dev/pandas)\n- [Pillow](https://github.com/python-pillow/Pillow)\n- [Poetry](https://github.com/python-poetry/poetry)\n- [Polars](https://github.com/pola-rs/polars)\n- [PostHog](https://github.com/PostHog/posthog)\n- Prefect ([Python SDK](https://github.com/PrefectHQ/prefect), [Marvin](https://github.com/PrefectHQ/marvin))\n- [PyInstaller](https://github.com/pyinstaller/pyinstaller)\n- [PyMC](https://github.com/pymc-devs/pymc/)\n- [PyMC-Marketing](https://github.com/pymc-labs/pymc-marketing)\n- [pytest](https://github.com/pytest-dev/pytest)\n- [PyTorch](https://github.com/pytorch/pytorch)\n- [Pydantic](https://github.com/pydantic/pydantic)\n- [Pylint](https://github.com/PyCQA/pylint)\n- [PyVista](https://github.com/pyvista/pyvista)\n- [Reflex](https://github.com/reflex-dev/reflex)\n- [River](https://github.com/online-ml/river)\n- [Rippling](https://rippling.com)\n- [Robyn](https://github.com/sansyrox/robyn)\n- [Saleor](https://github.com/saleor/saleor)\n- Scale AI ([Launch SDK](https://github.com/scaleapi/launch-python-client))\n- [SciPy](https://github.com/scipy/scipy)\n- Snowflake ([SnowCLI](https://github.com/Snowflake-Labs/snowcli))\n- [Sphinx](https://github.com/sphinx-doc/sphinx)\n- [Stable Baselines3](https://github.com/DLR-RM/stable-baselines3)\n- [Starlette](https://github.com/encode/starlette)\n- [Streamlit](https://github.com/streamlit/streamlit)\n- [The Algorithms](https://github.com/TheAlgorithms/Python)\n- [Vega-Altair](https://github.com/altair-viz/altair)\n- WordPress ([Openverse](https://github.com/WordPress/openverse))\n- [ZenML](https://github.com/zenml-io/zenml)\n- [Zulip](https://github.com/zulip/zulip)\n- [build (PyPA)](https://github.com/pypa/build)\n- [cibuildwheel (PyPA)](https://github.com/pypa/cibuildwheel)\n- [delta-rs](https://github.com/delta-io/delta-rs)\n- [featuretools](https://github.com/alteryx/featuretools)\n- [meson-python](https://github.com/mesonbuild/meson-python)\n- [nox](https://github.com/wntrblm/nox)\n- [pip](https://github.com/pypa/pip)\n\n### Show Your Support\n\nIf you're using Ruff, consider adding the Ruff badge to your project's `README.md`:\n\n```md\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n```\n\n...or `README.rst`:\n\n```rst\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Ruff\n```\n\n...or, as HTML:\n\n```html\n<a href=\"https://github.com/astral-sh/ruff\"><img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\" alt=\"Ruff\" style=\"max-width:100%;\"></a>\n```\n\n## License\n\nThis repository is licensed under the [MIT License](https://github.com/astral-sh/ruff/blob/main/LICENSE)\n\n<div align=\"center\">\n  <a target=\"_blank\" href=\"https://astral.sh\" style=\"background:none\">\n    <img src=\"https://raw.githubusercontent.com/astral-sh/ruff/main/assets/svg/Astral.svg\" alt=\"Made by Astral\">\n  </a>\n</div>\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An extremely fast Python linter and code formatter, written in Rust.",
    "version": "0.4.9",
    "project_urls": {
        "Changelog": "https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md",
        "Documentation": "https://docs.astral.sh/ruff/",
        "Homepage": "https://docs.astral.sh/ruff",
        "Repository": "https://github.com/astral-sh/ruff"
    },
    "split_keywords": [
        "automation",
        " flake8",
        " pycodestyle",
        " pyflakes",
        " pylint",
        " clippy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "190ecacefb59c6a7dd2bd1de5640902e2e690e52c11c2140f9fa93f764293e27",
                "md5": "43ac1365a8ff68e9506c08335bc62639",
                "sha256": "b262ed08d036ebe162123170b35703aaf9daffecb698cd367a8d585157732991"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "43ac1365a8ff68e9506c08335bc62639",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8530458,
            "upload_time": "2024-06-14T15:18:25",
            "upload_time_iso_8601": "2024-06-14T15:18:25.606662Z",
            "url": "https://files.pythonhosted.org/packages/19/0e/cacefb59c6a7dd2bd1de5640902e2e690e52c11c2140f9fa93f764293e27/ruff-0.4.9-py3-none-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "170e2d7d11d34aa78427f19aaa40b2e2cf5d110dd66fab11106a4a316f4a159d",
                "md5": "41766cb94855f004c05ab064f6ab7169",
                "sha256": "98ec2775fd2d856dc405635e5ee4ff177920f2141b8e2d9eb5bd6efd50e80317"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "41766cb94855f004c05ab064f6ab7169",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8159563,
            "upload_time": "2024-06-14T15:18:38",
            "upload_time_iso_8601": "2024-06-14T15:18:38.082129Z",
            "url": "https://files.pythonhosted.org/packages/17/0e/2d7d11d34aa78427f19aaa40b2e2cf5d110dd66fab11106a4a316f4a159d/ruff-0.4.9-py3-none-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02da0500bbfbe41f6d94fb7307a3235e3f0759ec2e6d77180b6f8b80ea887d7b",
                "md5": "33016cd60cd28d2b30fcd664ab54f66f",
                "sha256": "4555056049d46d8a381f746680db1c46e67ac3b00d714606304077682832998e"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "33016cd60cd28d2b30fcd664ab54f66f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8191139,
            "upload_time": "2024-06-14T15:18:41",
            "upload_time_iso_8601": "2024-06-14T15:18:41.341737Z",
            "url": "https://files.pythonhosted.org/packages/02/da/0500bbfbe41f6d94fb7307a3235e3f0759ec2e6d77180b6f8b80ea887d7b/ruff-0.4.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9893f031fc6dba56aba9aa22883e812b3cb16dc1dc6709fdbe20be738e31a724",
                "md5": "aa3177abdc4e613822a6e2833f35e929",
                "sha256": "e91175fbe48f8a2174c9aad70438fe9cb0a5732c4159b2a10a3565fea2d94cde"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "aa3177abdc4e613822a6e2833f35e929",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7589498,
            "upload_time": "2024-06-14T15:18:45",
            "upload_time_iso_8601": "2024-06-14T15:18:45.096616Z",
            "url": "https://files.pythonhosted.org/packages/98/93/f031fc6dba56aba9aa22883e812b3cb16dc1dc6709fdbe20be738e31a724/ruff-0.4.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5710bbffdc8e52b8711ee2c4570ce694f7adbd74a7f8eb2f31362e732cb60515",
                "md5": "38cd71c61b957b683e492a42192b4779",
                "sha256": "0e8e7b95673f22e0efd3571fb5b0cf71a5eaaa3cc8a776584f3b2cc878e46bff"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "38cd71c61b957b683e492a42192b4779",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8780434,
            "upload_time": "2024-06-14T15:18:48",
            "upload_time_iso_8601": "2024-06-14T15:18:48.589023Z",
            "url": "https://files.pythonhosted.org/packages/57/10/bbffdc8e52b8711ee2c4570ce694f7adbd74a7f8eb2f31362e732cb60515/ruff-0.4.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cf4ddd5645482d3a434129b90f3cbc86155ffbdfa356a43ac34a328dda70189",
                "md5": "1b75f981213cd2f2107a80e8b586b703",
                "sha256": "78de3fdb95c4af084087628132336772b1c5044f6e710739d440fc0bccf4d321"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "1b75f981213cd2f2107a80e8b586b703",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9077527,
            "upload_time": "2024-06-14T15:18:55",
            "upload_time_iso_8601": "2024-06-14T15:18:55.087628Z",
            "url": "https://files.pythonhosted.org/packages/8c/f4/ddd5645482d3a434129b90f3cbc86155ffbdfa356a43ac34a328dda70189/ruff-0.4.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b74a2adfbbf5268a23c4242f5e531bd52cf98647e3d3de15ed34722189892ac2",
                "md5": "619202ae3480aa74b476613f13f64c51",
                "sha256": "2d45ddc6d82e1190ea737341326ecbc9a61447ba331b0a8962869fcada758505"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl",
            "has_sig": false,
            "md5_digest": "619202ae3480aa74b476613f13f64c51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9471119,
            "upload_time": "2024-06-14T15:18:52",
            "upload_time_iso_8601": "2024-06-14T15:18:52.137144Z",
            "url": "https://files.pythonhosted.org/packages/b7/4a/2adfbbf5268a23c4242f5e531bd52cf98647e3d3de15ed34722189892ac2/ruff-0.4.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab0a9bd8a497aa874c32f3da7ed597a4c0c1853d745d26ea02a759d45d78f271",
                "md5": "5049136ff1b95ad8c8eeeaeb3ad9c13a",
                "sha256": "06b60f91bfa5514bb689b500a25ba48e897d18fea14dce14b48a0c40d1635893"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "5049136ff1b95ad8c8eeeaeb3ad9c13a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10216729,
            "upload_time": "2024-06-14T15:18:58",
            "upload_time_iso_8601": "2024-06-14T15:18:58.026649Z",
            "url": "https://files.pythonhosted.org/packages/ab/0a/9bd8a497aa874c32f3da7ed597a4c0c1853d745d26ea02a759d45d78f271/ruff-0.4.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d32f3a63f461895201c6836f7822f29ada06d9cbd4b506b152f1d2800c917853",
                "md5": "6dcf5a5b3386400f209ef3b635b21d0f",
                "sha256": "88bffe9c6a454bf8529f9ab9091c99490578a593cc9f9822b7fc065ee0712a06"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6dcf5a5b3386400f209ef3b635b21d0f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8796158,
            "upload_time": "2024-06-14T15:19:01",
            "upload_time_iso_8601": "2024-06-14T15:19:01.408921Z",
            "url": "https://files.pythonhosted.org/packages/d3/2f/3a63f461895201c6836f7822f29ada06d9cbd4b506b152f1d2800c917853/ruff-0.4.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ec88377e4a8677531805f081e5bc659dd7b24d780d2b628bde4904f0b98e658",
                "md5": "5927c6ce2bc7461f375c336f74b40693",
                "sha256": "673bddb893f21ab47a8334c8e0ea7fd6598ecc8e698da75bcd12a7b9d0a3206e"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "5927c6ce2bc7461f375c336f74b40693",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8103975,
            "upload_time": "2024-06-14T15:19:05",
            "upload_time_iso_8601": "2024-06-14T15:19:05.789231Z",
            "url": "https://files.pythonhosted.org/packages/1e/c8/8377e4a8677531805f081e5bc659dd7b24d780d2b628bde4904f0b98e658/ruff-0.4.9-py3-none-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc7a5b2eebe8efd89f210b8fb8ad36af35fa9163cc38c2f34e1c13baa92433d4",
                "md5": "7705f11e36a8acc4fc94feefbf202f4a",
                "sha256": "8c1aff58c31948cc66d0b22951aa19edb5af0a3af40c936340cd32a8b1ab7438"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-musllinux_1_2_armv7l.whl",
            "has_sig": false,
            "md5_digest": "7705f11e36a8acc4fc94feefbf202f4a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7590399,
            "upload_time": "2024-06-14T15:19:09",
            "upload_time_iso_8601": "2024-06-14T15:19:09.169061Z",
            "url": "https://files.pythonhosted.org/packages/dc/7a/5b2eebe8efd89f210b8fb8ad36af35fa9163cc38c2f34e1c13baa92433d4/ruff-0.4.9-py3-none-musllinux_1_2_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b078b51631276d0db7ec9fe32490e6bc9206a3f670abc4a0ffeecdeeb0d45ac4",
                "md5": "22ae62e737e6bcac0ed01a08e57a5aae",
                "sha256": "784d3ec9bd6493c3b720a0b76f741e6c2d7d44f6b2be87f5eef1ae8cc1d54c84"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-musllinux_1_2_i686.whl",
            "has_sig": false,
            "md5_digest": "22ae62e737e6bcac0ed01a08e57a5aae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8372311,
            "upload_time": "2024-06-14T15:19:12",
            "upload_time_iso_8601": "2024-06-14T15:19:12.587587Z",
            "url": "https://files.pythonhosted.org/packages/b0/78/b51631276d0db7ec9fe32490e6bc9206a3f670abc4a0ffeecdeeb0d45ac4/ruff-0.4.9-py3-none-musllinux_1_2_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c18c9d717a0be15ca5aee55e918fe02a8dfca92a756a02b809671576f2920d8",
                "md5": "f3c62f32e510751a6b9d69d59c701577",
                "sha256": "732dd550bfa5d85af8c3c6cbc47ba5b67c6aed8a89e2f011b908fc88f87649db"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f3c62f32e510751a6b9d69d59c701577",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8858132,
            "upload_time": "2024-06-14T15:19:16",
            "upload_time_iso_8601": "2024-06-14T15:19:16.146507Z",
            "url": "https://files.pythonhosted.org/packages/8c/18/c9d717a0be15ca5aee55e918fe02a8dfca92a756a02b809671576f2920d8/ruff-0.4.9-py3-none-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7958c4672c1d0debd608a1a00d395a5071ebeb519fdf0068f02e8fcfd490e0c4",
                "md5": "c82278d483d4c78ca29bc6925a45db62",
                "sha256": "8064590fd1a50dcf4909c268b0e7c2498253273309ad3d97e4a752bb9df4f521"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-win32.whl",
            "has_sig": false,
            "md5_digest": "c82278d483d4c78ca29bc6925a45db62",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7826658,
            "upload_time": "2024-06-14T15:19:20",
            "upload_time_iso_8601": "2024-06-14T15:19:20.077976Z",
            "url": "https://files.pythonhosted.org/packages/79/58/c4672c1d0debd608a1a00d395a5071ebeb519fdf0068f02e8fcfd490e0c4/ruff-0.4.9-py3-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cdb23ac36982ae94cb78bfea85b79fbc868c9d2fb68bbbabf1e85ca9a9b2ba9a",
                "md5": "cf2ffedf56e14ae85841cadb676eea2e",
                "sha256": "e0a22c4157e53d006530c902107c7f550b9233e9706313ab57b892d7197d8e52"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "cf2ffedf56e14ae85841cadb676eea2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8603542,
            "upload_time": "2024-06-14T15:19:23",
            "upload_time_iso_8601": "2024-06-14T15:19:23.316870Z",
            "url": "https://files.pythonhosted.org/packages/cd/b2/3ac36982ae94cb78bfea85b79fbc868c9d2fb68bbbabf1e85ca9a9b2ba9a/ruff-0.4.9-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "119b83e4ee4825cb66a724dd20aefda7d628cd56148fe1153feea513a3e8c53a",
                "md5": "1fd8ddb95ad39f810360c986b542f01c",
                "sha256": "5d5460f789ccf4efd43f265a58538a2c24dbce15dbf560676e430375f20a8198"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9-py3-none-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "1fd8ddb95ad39f810360c986b542f01c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7951797,
            "upload_time": "2024-06-14T15:19:27",
            "upload_time_iso_8601": "2024-06-14T15:19:27.002273Z",
            "url": "https://files.pythonhosted.org/packages/11/9b/83e4ee4825cb66a724dd20aefda7d628cd56148fe1153feea513a3e8c53a/ruff-0.4.9-py3-none-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8153e4e59acfc403dc93f0374f46244dd70e192d89620d6a28ca99f007b22d24",
                "md5": "29a9b3044a81185a1a53e06059e4d4e3",
                "sha256": "f1cb0828ac9533ba0135d148d214e284711ede33640465e706772645483427e3"
            },
            "downloads": -1,
            "filename": "ruff-0.4.9.tar.gz",
            "has_sig": false,
            "md5_digest": "29a9b3044a81185a1a53e06059e4d4e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2575961,
            "upload_time": "2024-06-14T15:19:30",
            "upload_time_iso_8601": "2024-06-14T15:19:30.344876Z",
            "url": "https://files.pythonhosted.org/packages/81/53/e4e59acfc403dc93f0374f46244dd70e192d89620d6a28ca99f007b22d24/ruff-0.4.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-14 15:19:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "astral-sh",
    "github_project": "ruff",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ruff"
}
        
Elapsed time: 0.26823s