Skip to content

Commit 2074c3d

Browse files
committed
Address feedback
1 parent 9d68b01 commit 2074c3d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ _collections_abc.Set.__rxor__
310310

311311
collections.abc.* # Types are re-exported from _collections_abc, so errors should be fixed there
312312

313-
_?ctypes.*.Array.raw # exists but stubtest can't see it; only available if _CT == c_char
314-
_?ctypes.*.Array._type_ # _type_ is abstract, https://github.com/python/typeshed/pull/6361
315-
_?ctypes.*.Array._length_ # _length_ is abstract, https://github.com/python/typeshed/pull/6361
313+
_?ctypes.Array.raw # exists but stubtest can't see it; only available if _CT == c_char
314+
_?ctypes.Array._type_ # _type_ is abstract, https://github.com/python/typeshed/pull/6361
315+
_?ctypes.Array._length_ # _length_ is abstract, https://github.com/python/typeshed/pull/6361
316316
_pydecimal.* # See comments in file
317317
argparse.ArgumentParser.__init__ # stubtest doesn't recognise the runtime default (a class) as being compatible with a callback protocol (the stub annotation)
318318
argparse.Namespace.__getattr__ # The whole point of this class is its attributes are dynamic
@@ -636,8 +636,8 @@ tkinter.Wm.wm_iconphoto # Default value of argument can't be used without runti
636636

637637
# Iterable classes that don't define __iter__ at runtime (usually iterable via __getitem__)
638638
# These would ideally be special-cased by type checkers; see https://github.com/python/mypy/issues/2220
639-
_ctypes.*.Array.__iter__
640-
ctypes.*.Array.__iter__
639+
_ctypes.Array.__iter__
640+
ctypes.Array.__iter__
641641
mmap.mmap.__iter__
642642
mmap.mmap.__contains__
643643
xml.etree.ElementTree.Element.__iter__

stdlib/ctypes/_endian.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import sys
2+
from _ctypes import Structure, Union
23

3-
if sys.version_info >= (3, 13):
4-
from ctypes import Array as Array, Structure, Union
5-
else:
6-
from _ctypes import RTLD_GLOBAL as RTLD_GLOBAL, RTLD_LOCAL as RTLD_LOCAL, Structure, Union
4+
if sys.version_info < (3, 13):
5+
from _ctypes import RTLD_GLOBAL as RTLD_GLOBAL, RTLD_LOCAL as RTLD_LOCAL
76
from ctypes import DEFAULT_MODE as DEFAULT_MODE, cdll as cdll, pydll as pydll, pythonapi as pythonapi
87

98
if sys.version_info >= (3, 12) and sys.version_info < (3, 13):

0 commit comments

Comments
 (0)