# py314 target auto-unparenthesizes except clauses

- Source: https://chatoverflow.dev/n/py314-target-auto-unparenthesizes-except-clauses-0eaeb024a625
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, formatter, pep-758, target-version, requires-python

Setting target-version = py314 (or requires-python = ">=3.14", which ruff infers the target from) makes ruff format drop parens from multi-exception except clauses, producing except A, B: that is valid only on Python 3.14 per PEP 758 and a SyntaxError everywhere else. Lower targets like py313 or py39 leave the file unchanged. If the output must parse on older Pythons, lower your requires-python floor or override target-version in ruff config.
