| [build-system] |
| requires = ["maturin>=1.9,<2.0"] |
| build-backend = "maturin" |
| |
| [project] |
| name = "ruff" |
| version = "0.15.2" |
| description = "An extremely fast Python linter and code formatter, written in Rust." |
| authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }] |
| readme = "README.md" |
| requires-python = ">=3.7" |
| license = { file = "LICENSE" } |
| keywords = [ |
| "automation", |
| "flake8", |
| "pycodestyle", |
| "pyflakes", |
| "pylint", |
| "clippy", |
| ] |
| classifiers = [ |
| "Development Status :: 5 - Production/Stable", |
| "Environment :: Console", |
| "Intended Audience :: Developers", |
| "License :: OSI Approved :: MIT License", # for compatibility with tooling such as pip-licenses |
| "Operating System :: OS Independent", |
| "Programming Language :: Python", |
| "Programming Language :: Python :: 3.7", |
| "Programming Language :: Python :: 3.8", |
| "Programming Language :: Python :: 3.9", |
| "Programming Language :: Python :: 3.10", |
| "Programming Language :: Python :: 3.11", |
| "Programming Language :: Python :: 3.12", |
| "Programming Language :: Python :: 3.13", |
| "Programming Language :: Python :: 3.14", |
| "Programming Language :: Python :: 3 :: Only", |
| "Programming Language :: Rust", |
| "Topic :: Software Development :: Libraries :: Python Modules", |
| "Topic :: Software Development :: Quality Assurance", |
| ] |
| |
| [project.urls] |
| Repository = "https://github.com/astral-sh/ruff" |
| Documentation = "https://docs.astral.sh/ruff/" |
| Changelog = "https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md" |
| |
| [tool.maturin] |
| bindings = "bin" |
| manifest-path = "crates/ruff/Cargo.toml" |
| module-name = "ruff" |
| python-source = "python" |
| strip = true |
| exclude = [ |
| "crates/ruff_linter/resources/test/fixtures/**/*", |
| "crates/ruff_linter/src/rules/*/snapshots/**/*" |
| ] |
| |
| [tool.ruff] |
| target-version = "py38" |
| extend-exclude = [ |
| "crates/ty_vendored/vendor/", |
| "crates/ruff/resources/", |
| "crates/ruff_linter/resources/", |
| "crates/ruff_python_formatter/resources/", |
| "crates/ruff_python_parser/resources/", |
| "crates/ruff_python_semantic/resources/" |
| ] |
| |
| [tool.ruff.lint] |
| select = [ |
| "E", # pycodestyle (error) |
| "F", # pyflakes |
| "B", # bugbear |
| "B9", |
| "C4", # flake8-comprehensions |
| "SIM", # flake8-simplify |
| "I", # isort |
| "UP", # pyupgrade |
| "PIE", # flake8-pie |
| "PGH", # pygrep-hooks |
| "PYI", # flake8-pyi |
| "RUF", |
| ] |
| |
| ignore = [ |
| # only relevant if you run a script with `python -0`, |
| # which seems unlikely for any of the scripts in this repo |
| "B011", |
| # Leave it to the formatter to split long lines and |
| # the judgement of all of us. |
| "E501" |
| ] |
| |
| [tool.ruff.lint.isort] |
| required-imports = ["from __future__ import annotations"] |
| combine-as-imports = true |
| |
| [tool.ruff.per-file-target-version] |
| "crates/ty_python_semantic/mdtest.py" = "py310" |
| "crates/ty_vendored/ty_extensions/ty_extensions.pyi" = "py312" |
| |
| [tool.black] |
| force-exclude = ''' |
| /( |
| | crates/ty_vendored/vendor |
| | crates/ruff_linter/resources |
| | crates/ruff_python_formatter/resources |
| | crates/ruff_python_parser/resources |
| )/ |
| ''' |
| |
| [tool.rooster] |
| major_labels = [] # Ruff never uses the major version number |
| minor_labels = ["breaking"] # Bump the minor version on breaking changes |
| |
| ignore_labels = ["internal", "ci", "testing", "ty"] |
| |
| version_files = [ |
| "README.md", |
| "pyproject.toml", |
| # Might become unneeded once Markdown formatting is stabilized. |
| "docs/formatter.md", |
| "docs/integrations.md", |
| "docs/tutorial.md", |
| "crates/ruff/Cargo.toml", |
| "crates/ruff_linter/Cargo.toml", |
| # Note that the value being replaced here needs to be kept in sync with the |
| # validation regex in the `violation_metadata` macro. |
| { target = "crates/ruff_linter/src/rules/**/*.rs", replace = "NEXT_RUFF_VERSION" }, |
| "crates/ruff_wasm/Cargo.toml", |
| "scripts/benchmarks/pyproject.toml", |
| ] |
| |
| [tool.rooster.section-labels] |
| "Breaking changes" = ["breaking"] |
| "Preview features" = ["preview"] |
| "Bug fixes" = ["bug"] |
| "Rule changes" = [ |
| "diagnostics", |
| "docstrings", |
| "rule", |
| "fixes", |
| "isort", |
| ] |
| "Performance" = ["performance"] |
| "Formatter" = ["formatter"] |
| "Server" = ["server"] |
| "CLI" = ["cli"] |
| "Configuration" = ["configuration"] |
| "Documentation" = ["documentation"] |
| "Other changes" = ["__unknown__"] |