Make inheritance and metaclass of ctypes better match reality (#12982)

This commit is contained in:
Stephen Morton
2024-11-18 03:32:20 -08:00
committed by GitHub
parent 780626ee36
commit b2c964fdea
6 changed files with 197 additions and 66 deletions

View File

@@ -312,6 +312,8 @@ collections.abc.* # Types are re-exported from _collections_abc, so errors shou
_?ctypes.Array.raw # exists but stubtest can't see it; only available if _CT == c_char
_?ctypes.Array._type_ # _type_ is abstract, https://github.com/python/typeshed/pull/6361
_?ctypes.Array._length_ # _length_ is abstract, https://github.com/python/typeshed/pull/6361
_?ctypes.Structure.__getattr__ # doesn't exist, but makes things easy if we pretend it does
_?ctypes.Union.__getattr__ # doesn't exist, but makes things easy if we pretend it does
# runtime is *args, **kwargs due to a wrapper
# we have more accurate signatures in the stubs