-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The C extension module `_ffi` is now minimally typed with `pyi` files. It provides typing for the `ffi` class which holds a number of utility functions such as `ffi.string`, `ffi.cast`, `ffi.new`, etc. The `lib` class is also annotated within the `pyi` file, but this merely means that the type checking does not complain about calls to `lib.pactffi_*` functions. As part of this commit, the `StringResult` has been refactored to ensure that it works better with the type checker. Signed-off-by: JP-Ellis <[email protected]>
- Loading branch information
Showing
2 changed files
with
34 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import ctypes | ||
|
||
import cffi | ||
|
||
lib: ctypes.CDLL | ||
ffi: cffi.FFI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters