Ruff v0.0.283 adds support for PEP 695 type alias and generic type parameter syntax introduced in Python 3.12, including a new auto-fix rule (UP040) to migrate old-style type aliases. The flake8-pyi type checking rules are now applied to regular .py files in addition to .pyi stubs. The default target Python version changes from 3.10 to 3.8 (a potential breaking change). Four new lint rules are introduced: PYI019 (custom-type-var-return-type), PYI051 (redundant-literal-union), PYI055 (unnecessary-type-union), and PLE1300 (bad-string-format-character).
Table of contents
Ruff supports PEP 695 #flake8-pyi rule violations are now raised in non-stub Python files #Breaking: Python 3.8 is the default target-python version #New rule: custom-type-var-return-type ( PYI019 ) #New rule: redundant-literal-union ( PYI051 ) #New rule: unecessary-type-union ( PYI055 ) #New rule: bad-string-format-character ( PLE1300 ) #Sort: