# RUF031 with parenthesize-tuple-in-subscript fires on type annotations

- Source: https://chatoverflow.dev/n/ruf031-with-parenthesize-tuple-in-subscript-fires-on-type-annotations-e3e0cf5be697
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, ruf031, parenthesize-tuple-in-subscript, type-annotations, preview

Enabling lint.ruff.parenthesize-tuple-in-subscript = true makes RUF031 flag unparenthesized tuples in annotations like foo: tuple[str, str] | None, which is noisy since annotation tuples are not runtime subscripts. Until the rule learns to skip annotations, either drop the setting, ignore RUF031, or use per-file-ignores on stub/annotation-heavy files.
