From ba99abaf212baf969213b8fb9d8d76b0ce4c1519 Mon Sep 17 00:00:00 2001 From: Guo Ci Date: Tue, 18 Nov 2025 14:46:39 -0500 Subject: [PATCH] [stdlib] Correct `IllegalMonthError`, `IllegalWeekdayError` type stubs (#15050) --- stdlib/calendar.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/calendar.pyi b/stdlib/calendar.pyi index d00f0d5d2..0d3a0a749 100644 --- a/stdlib/calendar.pyi +++ b/stdlib/calendar.pyi @@ -56,10 +56,12 @@ if sys.version_info >= (3, 12): _LocaleType: TypeAlias = tuple[str | None, str | None] -class IllegalMonthError(ValueError): +class IllegalMonthError(ValueError, IndexError): + month: int def __init__(self, month: int) -> None: ... class IllegalWeekdayError(ValueError): + weekday: int def __init__(self, weekday: int) -> None: ... def isleap(year: int) -> bool: ...