Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e571017

Browse files
authored
[cffi] Fix a few argument types for C code (#13661)
* CLibrary.close_lib() doesn't take any arguments. * FFI.typeof() only takes positional arguments.
1 parent bb244d3 commit e571017

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stubs/cffi/_cffi_backend.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CField:
3434

3535
@final
3636
class CLibrary:
37-
def close_lib(self, *args, **kwargs): ...
37+
def close_lib(self) -> None: ...
3838
def load_function(self, *args, **kwargs): ...
3939
def read_variable(self, *args, **kwargs): ...
4040
def write_variable(self, *args, **kwargs): ...
@@ -204,7 +204,7 @@ class FFI:
204204
def release(self, cdata: CData, /) -> None: ...
205205
def sizeof(self, cdecl: str | CType | CData, /) -> int: ...
206206
def string(self, cdata: CData, maxlen: int = -1) -> bytes | str: ...
207-
def typeof(self, cdecl: str | CData) -> CType: ...
207+
def typeof(self, cdecl: str | CData, /) -> CType: ...
208208
def unpack(self, cdata: CData, length: int) -> bytes | str | list[Any]: ...
209209

210210
def alignof(cdecl: CType, /) -> int: ...

0 commit comments

Comments
 (0)