From e646bd917e38eaab5882170aa563700d910dee03 Mon Sep 17 00:00:00 2001 From: Finite State Machine <38001514+finite-state-machine@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:50:56 -0500 Subject: [PATCH] Fix `optional` validator to accept tuples of len > 1 --- src/attr/validators.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/attr/validators.pyi b/src/attr/validators.pyi index 36a7e800c..18fb112c8 100644 --- a/src/attr/validators.pyi +++ b/src/attr/validators.pyi @@ -54,7 +54,7 @@ def optional( validator: ( _ValidatorType[_T] | list[_ValidatorType[_T]] - | tuple[_ValidatorType[_T]] + | tuple[_ValidatorType[_T], ...] ), ) -> _ValidatorType[_T | None]: ... def in_(options: Container[_T]) -> _ValidatorType[_T]: ...