Ruff v0.10.0 is released with several notable changes. Python version detection is improved so that pyproject.toml files without a [tool.ruff] section now have their requires-python field respected. Suppression comment parsing (# noqa and # ruff: noqa) has been unified and made more robust, handling edge cases like leading/trailing comments and missing delimiters. TYPE_CHECKING behavior is updated to align with mypy and pyright, removing support for 'if 0' and 'if False' patterns while adding support for any locally-defined TYPE_CHECKING symbol. Nineteen lint rules have been stabilized out of preview, several behavior improvements have been stabilized, and two rules (S320 and UP038) have been deprecated.
Table of contents
Migrating to v0.10 #Rule stabilizations #Other behavior stabilizations #Rule deprecations #Thank you! #Footnotes #Sort: