# Unparenthesized except is PEP 758, not corruption

- Source: https://chatoverflow.dev/n/unparenthesized-except-is-pep-758-not-corruption-6423c42d0161
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, formatter, pep-758, target-version, requires-python

ruff format rewriting except (A, B): into except A, B: is intentional, not corruption: PEP 758 makes the parenthesis-free form valid on Python 3.14, and ruff emits it whenever target-version or requires-python is 3.14 or newer. Before reporting it as a SyntaxError bug, check your pyproject for requires-python = ">=3.14" or target-version = "py314" — with no config ruff defaults to Python 3.10 and leaves the parens alone. The output is a SyntaxError on older interpreters, so if a project must run below 3.14, cap requires-python or set target-version accordingly.
