{"id":13412116,"url":"https://github.com/astral-sh/ruff","last_synced_at":"2026-02-26T17:21:23.747Z","repository":{"id":58181104,"uuid":"523043277","full_name":"astral-sh/ruff","owner":"astral-sh","description":"An extremely fast Python linter and code formatter, written in Rust.","archived":false,"fork":false,"pushed_at":"2026-02-11T14:16:00.000Z","size":122641,"stargazers_count":45703,"open_issues_count":1887,"forks_count":1763,"subscribers_count":95,"default_branch":"main","last_synced_at":"2026-02-11T14:17:54.674Z","etag":null,"topics":["linter","pep8","python","python3","ruff","rust","rustpython","static-analysis","static-code-analysis","style-guide","styleguide"],"latest_commit_sha":null,"homepage":"https://docs.astral.sh/ruff","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astral-sh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-09T17:17:44.000Z","updated_at":"2026-02-11T14:16:03.000Z","dependencies_parsed_at":"2022-09-01T04:31:44.063Z","dependency_job_id":"9cfc39fa-6296-4921-b42f-fd7d97d9ab03","html_url":"https://github.com/astral-sh/ruff","commit_stats":{"total_commits":8993,"total_committers":566,"mean_commits":15.8886925795053,"dds":0.6122539753141332,"last_synced_commit":"d45c1ee44f53d9c606085e79da1830b558fc001f"},"previous_names":["astral-sh/ruff","charliermarsh/ruff"],"tags_count":398,"template":false,"template_full_name":null,"purl":"pkg:github/astral-sh/ruff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astral-sh%2Fruff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astral-sh%2Fruff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astral-sh%2Fruff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astral-sh%2Fruff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astral-sh","download_url":"https://codeload.github.com/astral-sh/ruff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astral-sh%2Fruff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29396847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T04:26:15.637Z","status":"ssl_error","status_checked_at":"2026-02-13T04:16:29.732Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linter","pep8","python","python3","ruff","rust","rustpython","static-analysis","static-code-analysis","style-guide","styleguide"],"created_at":"2024-07-30T20:01:21.161Z","updated_at":"2026-02-26T17:21:23.726Z","avatar_url":"https://github.com/astral-sh.png","language":"Rust","readme":"\u003c!-- Begin section: Overview --\u003e\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\u0026logoColor=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\u003cp align=\"center\"\u003e\n  \u003cpicture align=\"center\"\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/1309177/232603514-c95e9b0f-6b31-43de-9a80-9e844173fd6a.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/1309177/232603516-4fb4892d-585c-4b20-b810-3db9161831e4.svg\"\u003e\n    \u003cimg alt=\"Shows a bar chart with benchmark results.\" src=\"https://user-images.githubusercontent.com/1309177/232603516-4fb4892d-585c-4b20-b810-3db9161831e4.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eLinting the CPython codebase from scratch.\u003c/i\u003e\n\u003c/p\u003e\n\n- ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black)\n- 🐍 Installable via `pip`\n- 🛠️ `pyproject.toml` support\n- 🤝 Python 3.14 compatibility\n- ⚖️ Drop-in parity with [Flake8](https://docs.astral.sh/ruff/faq/#how-does-ruffs-linter-compare-to-flake8), isort, and [Black](https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black)\n- 📦 Built-in caching, to avoid re-analyzing unchanged files\n- 🔧 Fix support, for automatic error correction (e.g., automatically remove unused imports)\n- 📏 Over [800 built-in rules](https://docs.astral.sh/ruff/rules/), with native re-implementations\n    of popular Flake8 plugins, like flake8-bugbear\n- ⌨️ First-party [editor integrations](https://docs.astral.sh/ruff/editors) for [VS Code](https://github.com/astral-sh/ruff-vscode) and [more](https://docs.astral.sh/ruff/editors/setup)\n- 🌎 Monorepo-friendly, with [hierarchical and cascading configuration](https://docs.astral.sh/ruff/configuration/#config-file-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), the creators of\n[uv](https://github.com/astral-sh/uv) and [ty](https://github.com/astral-sh/ty).\n\nRead the [launch\npost](https://astral.sh/blog/announcing-astral-the-company-behind-ruff), or the\noriginal [project\nannouncement](https://notes.crmarsh.com/python-tooling-could-be-much-much-faster).\n\n## Testimonials\n\n[**Sebastián Ramírez**](https://twitter.com/tiangolo/status/1591912354882764802), creator\nof [FastAPI](https://github.com/tiangolo/fastapi):\n\n\u003e Ruff is so fast that sometimes I add an intentional bug in the code just to confirm it's actually\n\u003e 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\u003e Why is Ruff a gamechanger? Primarily because it is nearly 1000x faster. Literally. Not a typo. On\n\u003e our largest module (dagster itself, 250k LOC) pylint takes about 2.5 minutes, parallelized across 4\n\u003e 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\u003e Ruff is ~150-200x faster than flake8 on my machine, scanning the whole repo takes ~0.2s instead of\n\u003e ~20s. This is an enormous quality of life improvement for local dev. It's fast enough that I added\n\u003e 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\u003e Just switched my first project to Ruff. Only one downside so far: it's so fast I couldn't believe\n\u003e it was working till I intentionally introduced some errors.\n\n[**Tim Abbott**](https://github.com/zulip/zulip/pull/23431#issuecomment-1302557034), lead developer of [Zulip](https://github.com/zulip/zulip) (also [here](https://github.com/astral-sh/ruff/issues/465#issuecomment-1317400028)):\n\n\u003e This is just ridiculously fast... `ruff` is amazing.\n\n\u003c!-- End section: Overview --\u003e\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\u003ca id=\"getting-started\"\u003e\u003c/a\u003e\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\nInvoke Ruff directly with [`uvx`](https://docs.astral.sh/uv/):\n\n```shell\nuvx ruff check   # Lint all files in the current directory.\nuvx ruff format  # Format all files in the current directory.\n```\n\nOr install Ruff with `uv` (recommended), `pip`, or `pipx`:\n\n```shell\n# With uv.\nuv tool install ruff@latest  # Install Ruff globally.\nuv add --dev ruff            # Or add Ruff to your project.\n\n# With pip.\npip install ruff\n\n# With pipx.\npipx install ruff\n```\n\nStarting with version `0.5.0`, Ruff can be installed with our standalone installers:\n\n```shell\n# On macOS and Linux.\ncurl -LsSf https://astral.sh/ruff/install.sh | sh\n\n# On Windows.\npowershell -c \"irm https://astral.sh/ruff/install.ps1 | iex\"\n\n# For a specific version.\ncurl -LsSf https://astral.sh/ruff/0.15.3/install.sh | sh\npowershell -c \"irm https://astral.sh/ruff/0.15.3/install.ps1 | iex\"\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.15.3\n  hooks:\n    # Run the linter.\n    - id: ruff-check\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 with [various other editors](https://docs.astral.sh/ruff/editors/setup).\n\nRuff can also be used as a [GitHub Action](https://github.com/features/actions) via\n[`ruff-action`](https://github.com/astral-sh/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: astral-sh/ruff-action@v3\n```\n\n### Configuration\u003ca id=\"configuration\"\u003e\u003c/a\u003e\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.9\ntarget-version = \"py39\"\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/preview/) 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\u003ca id=\"rules\"\u003e\u003c/a\u003e\n\n\u003c!-- Begin section: Rules --\u003e\n\n**Ruff supports over 900 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\nIn [preview](https://docs.astral.sh/ruff/preview/), Ruff enables an expanded set of default rules\nthat includes rules from the `B`, `UP`, and `RUF` categories, as well as many more. If you give the\nnew defaults a try, feel free to leave feedback in the [GitHub\ndiscussion](https://github.com/astral-sh/ruff/discussions/23203), where you can also find the new\nrule set listed in full.\n\n\u003c!-- End section: Rules --\u003e\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-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\u003ca id=\"contributing\"\u003e\u003c/a\u003e\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\u003ca id=\"support\"\u003e\u003c/a\u003e\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\u003ca id=\"acknowledgements\"\u003e\u003c/a\u003e\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?\u003ca id=\"whos-using-ruff\"\u003e\u003c/a\u003e\n\nRuff is used by a number of major open-source projects and companies, including:\n\n- [Albumentations](https://github.com/albumentations-team/AlbumentationsX)\n- Amazon ([AWS SAM](https://github.com/aws/serverless-application-model))\n- [Anki](https://apps.ankiweb.net/)\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- Capital One ([datacompy](https://github.com/capitalone/datacompy))\n- CrowdCent ([NumerBlox](https://github.com/crowdcent/numerblox)) \u003c!-- typos: ignore --\u003e\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- [Dify](https://github.com/langgenius/dify)\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- IBM ([Qiskit](https://github.com/Qiskit/qiskit))\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- [JAX](https://github.com/jax-ml/jax)\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- [Open Wine Components](https://github.com/Open-Wine-Components/umu-launcher)\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- [PyScripter](https://github.com/pyscripter/pyscripter)\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- [Weblate](https://weblate.org/)\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\u003ca href=\"https://github.com/astral-sh/ruff\"\u003e\u003cimg 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%;\"\u003e\u003c/a\u003e\n```\n\n## License\u003ca id=\"license\"\u003e\u003c/a\u003e\n\nThis repository is licensed under the [MIT License](https://github.com/astral-sh/ruff/blob/main/LICENSE)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://astral.sh\" style=\"background:none\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/astral-sh/ruff/main/assets/svg/Astral.svg\" alt=\"Made by Astral\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n","funding_links":[],"categories":["Rust","Development Tools","Development tools","Features","Linters","By Environment","All-in formatters","Python 程序","Recently Updated","🤩 Status: *awesome*","Python Packages","static-analysis","Documentation and Style Guide","Python","rust","Linters \u0026 Style Checkers","Code Analysis","后端","Helpers"],"sub_categories":["Formatters","Non-Functional Features","Python","网络服务_其他","[Oct 07, 2024](/content/2024/10/07/README.md)","Development","Templates","R","Python tools","图像","Code Analysis"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastral-sh%2Fruff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastral-sh%2Fruff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastral-sh%2Fruff/lists"}