Skip to content

Commit 468f099

Browse files
Merge pull request #29 from shenanigansd/hail-black
2 parents 12c9401 + be81d17 commit 468f099

File tree

12 files changed

+5719
-1808
lines changed

12 files changed

+5719
-1808
lines changed

src/pointers/__init__.py

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,43 @@
77
from ._utils import force_set_attr
88
from .api_bindings import *
99
from .base_pointers import (
10-
BaseAllocatedPointer, BaseCPointer, BaseObjectPointer, BasePointer,
11-
BasicPointer, Dereferencable, IterDereferencable, Sized, Typed
10+
BaseAllocatedPointer,
11+
BaseCPointer,
12+
BaseObjectPointer,
13+
BasePointer,
14+
BasicPointer,
15+
Dereferencable,
16+
IterDereferencable,
17+
Sized,
18+
Typed,
1219
)
1320
from .bindings import *
1421
from .c_pointer import (
15-
TypedCPointer, VoidPointer, array, cast, to_c_ptr, to_func_ptr,
16-
to_struct_ptr, to_voidp
22+
TypedCPointer,
23+
VoidPointer,
24+
array,
25+
cast,
26+
to_c_ptr,
27+
to_func_ptr,
28+
to_struct_ptr,
29+
to_voidp,
1730
)
1831
from .calloc import AllocatedArrayPointer, calloc
1932
from .custom_binding import binding, binds
2033
from .decay import decay, decay_annotated, decay_wrapped
2134
from .exceptions import (
22-
AllocationError, DereferenceError, FreedMemoryError,
23-
InvalidBindingParameter, InvalidSizeError, NullPointerError,
24-
SegmentViolation
35+
AllocationError,
36+
DereferenceError,
37+
FreedMemoryError,
38+
InvalidBindingParameter,
39+
InvalidSizeError,
40+
NullPointerError,
41+
SegmentViolation,
2542
)
2643
from .magic import _
2744
from .malloc import AllocatedPointer, free, malloc, realloc
2845
from .object_pointer import Pointer, to_ptr
29-
from .stack_pointer import (
30-
StackAllocatedPointer, acquire_stack_alloc, stack_alloc
31-
)
46+
from .stack_pointer import StackAllocatedPointer, acquire_stack_alloc, stack_alloc
3247
from .std_structs import DivT, Lconv, LDivT, Tm
3348
from .structure import Struct, StructPointer
3449
from .util import NULL, Nullable, handle, raw_type, struct_cast

src/pointers/_cstd.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
_c_library_name = find_library("c") or "libc.so.6"
2525

2626
dll = ctypes.CDLL(_c_library_name)
27-
mdll = dll if platform in ("win32", "cygwin") else ctypes.CDLL(
28-
find_library("m") or (
29-
"libm.dylib" if platform == "darwin" else "libm.so.6"
27+
mdll = (
28+
dll
29+
if platform in ("win32", "cygwin")
30+
else ctypes.CDLL(
31+
find_library("m") or ("libm.dylib" if platform == "darwin" else "libm.so.6")
3032
)
3133
)
3234

0 commit comments

Comments
 (0)