From 83e650279316c218f42bcc0345a2900581e2606d Mon Sep 17 00:00:00 2001 From: Peilonrayz Date: Tue, 21 Apr 2026 21:39:53 +0100 Subject: [PATCH 1/2] Fix false positives wrt. TextCalendar --- stdlib/calendar.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/calendar.pyi b/stdlib/calendar.pyi index 0d3a0a7490a3..b61e9c6c9efb 100644 --- a/stdlib/calendar.pyi +++ b/stdlib/calendar.pyi @@ -88,9 +88,9 @@ class Calendar: def itermonthdays4(self, year: int, month: int) -> Iterable[tuple[int, int, int, int]]: ... class TextCalendar(Calendar): - def prweek(self, theweek: int, width: int) -> None: ... + def prweek(self, theweek: Iterable[tuple[int, int]]., width: int) -> None: ... def formatday(self, day: int, weekday: int, width: int) -> str: ... - def formatweek(self, theweek: int, width: int) -> str: ... + def formatweek(self, theweek: Iterable[tuple[int, int]]., width: int) -> str: ... def formatweekday(self, day: int, width: int) -> str: ... def formatweekheader(self, width: int) -> str: ... def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = True) -> str: ... @@ -145,7 +145,7 @@ c: TextCalendar def setfirstweekday(firstweekday: int) -> None: ... def format(cols: int, colwidth: int = 20, spacing: int = 6) -> str: ... -def formatstring(cols: int, colwidth: int = 20, spacing: int = 6) -> str: ... +def formatstring(cols: Iterable[str], colwidth: int = 20, spacing: int = 6) -> str: ... def timegm(tuple: tuple[int, ...] | struct_time) -> int: ... # Data attributes From 6821a8ab0eea0bb744919500d8c44bbb3cccaa32 Mon Sep 17 00:00:00 2001 From: Peilonrayz Date: Tue, 21 Apr 2026 21:45:50 +0100 Subject: [PATCH 2/2] Fix incorrect periods. --- stdlib/calendar.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/calendar.pyi b/stdlib/calendar.pyi index b61e9c6c9efb..f8297a7dca93 100644 --- a/stdlib/calendar.pyi +++ b/stdlib/calendar.pyi @@ -88,9 +88,9 @@ class Calendar: def itermonthdays4(self, year: int, month: int) -> Iterable[tuple[int, int, int, int]]: ... class TextCalendar(Calendar): - def prweek(self, theweek: Iterable[tuple[int, int]]., width: int) -> None: ... + def prweek(self, theweek: Iterable[tuple[int, int]], width: int) -> None: ... def formatday(self, day: int, weekday: int, width: int) -> str: ... - def formatweek(self, theweek: Iterable[tuple[int, int]]., width: int) -> str: ... + def formatweek(self, theweek: Iterable[tuple[int, int]], width: int) -> str: ... def formatweekday(self, day: int, width: int) -> str: ... def formatweekheader(self, width: int) -> str: ... def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = True) -> str: ...