Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion stdlib/@tests/stubtest_allowlists/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,11 @@ _?ctypes.Union.__getattr__ # doesn't exist, but makes things easy if we pretend
_?ctypes.Union.__setattr__ # doesn't exist, but makes things easy if we pretend it does

# Iterable classes that don't define __iter__ at runtime (usually iterable via __getitem__)
# These would ideally be special-cased by type checkers; see https://github.com/python/mypy/issues/2220
# These would ideally be special-cased by type checkers.
# See https://github.com/python/mypy/issues/2220 and https://github.com/python/typeshed/issues/7813
_?ctypes.Array.__iter__
calendar._localized_day.__iter__
calendar._localized_month.__iter__

dataclasses.KW_ONLY # white lies around defaults

Expand Down
4 changes: 3 additions & 1 deletion stdlib/calendar.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import datetime
import enum
import sys
from _typeshed import Unused
from collections.abc import Iterable
from collections.abc import Iterable, Iterator
from time import struct_time
from typing import ClassVar, Final, TypeAlias, overload

Expand Down Expand Up @@ -170,6 +170,7 @@ class _localized_month:
def __getitem__(self, i: slice) -> list[str]: ...

def __len__(self) -> int: ...
def __iter__(self) -> Iterator[str]: ...

class _localized_day:
format: str
Expand All @@ -181,6 +182,7 @@ class _localized_day:
def __getitem__(self, i: slice) -> list[str]: ...

def __len__(self) -> int: ...
def __iter__(self) -> Iterator[str]: ...

day_name: _localized_day
day_abbr: _localized_day
Expand Down
Loading