@@ -249,7 +249,7 @@ class _UnionType(_CTypeBaseType):
249249 # At runtime, various attributes are created on a Union subclass based
250250 # on its _fields_. This method doesn't exist, but represents those
251251 # dynamically created attributes.
252- def __getattr__ (self , name : str ) -> _CField [Any , Any , Any ]: ...
252+ def __getattr__ (self , name : str , / ) -> _CField [Any , Any , Any ]: ...
253253 if sys .version_info < (3 , 13 ):
254254 # Inherited from CType_Type starting on 3.13
255255 def __mul__ (cls : type [_CT ], other : int ) -> type [Array [_CT ]]: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
@@ -263,8 +263,8 @@ class Union(_CData, metaclass=_UnionType):
263263 _align_ : ClassVar [int ]
264264
265265 def __init__ (self , * args : Any , ** kw : Any ) -> None : ...
266- def __getattr__ (self , name : str ) -> Any : ...
267- def __setattr__ (self , name : str , value : Any ) -> None : ...
266+ def __getattr__ (self , name : str , / ) -> Any : ...
267+ def __setattr__ (self , name : str , value : Any , / ) -> None : ...
268268
269269# This class is not exposed. It calls itself _ctypes.PyCStructType.
270270@type_check_only
@@ -277,7 +277,7 @@ class _PyCStructType(_CTypeBaseType):
277277 # At runtime, various attributes are created on a Structure subclass based
278278 # on its _fields_. This method doesn't exist, but represents those
279279 # dynamically created attributes.
280- def __getattr__ (self , name : str ) -> _CField [Any , Any , Any ]: ...
280+ def __getattr__ (self , name : str , / ) -> _CField [Any , Any , Any ]: ...
281281 if sys .version_info < (3 , 13 ):
282282 # Inherited from CType_Type starting on 3.13
283283 def __mul__ (cls : type [_CT ], other : int ) -> type [Array [_CT ]]: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
@@ -295,7 +295,7 @@ class Structure(_CData, metaclass=_PyCStructType):
295295 _layout_ : ClassVar [Literal ["ms" , "gcc-sysv" ]]
296296
297297 def __init__ (self , * args : Any , ** kw : Any ) -> None : ...
298- def __getattr__ (self , name : str ) -> Any : ...
298+ def __getattr__ (self , name : str , / ) -> Any : ...
299299 def __setattr__ (self , name : str , value : Any ) -> None : ...
300300
301301# This class is not exposed. It calls itself _ctypes.PyCArrayType.
0 commit comments