Skip to content

Commit 86916a4

Browse files
committed
i should be done with lint now
1 parent e314d60 commit 86916a4

23 files changed

+81
-109
lines changed

examples/binding_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pointers import fopen, fprintf, fclose
1+
from pointers import fclose, fopen, fprintf
22

33
file = fopen("/dev/null", "w")
44
fprintf(file, "hello world")

examples/custom_binding_example.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from pointers import binds, Struct, StructPointer
21
import ctypes
32

3+
from pointers import Struct, StructPointer, binds
4+
45
dll = ctypes.CDLL("libc.so.6")
56

67

examples/malloc_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pointers import malloc, free
1+
from pointers import free, malloc
22

33
memory = malloc(52)
44
memory <<= "abc"

examples/move_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pointers import to_ptr, Pointer, decay
1+
from pointers import Pointer, decay
22

33
a: str = "123"
44
b: str = "abc"

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build]
22
command = "mkdocs build"
3-
publish = "site"
3+
publish = "site"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mkdocs
1+
mkdocs

runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8
1+
3.8

src/_pointers.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Type, Any
1+
from typing import Any, Type
22

33
def add_ref(obj: Any) -> None: ...
44
def remove_ref(obj: Any) -> None: ...

src/pointers/_cstd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import ctypes
22
from platform import system
3-
from .struct import Struct
43
from typing import Dict, Type
54

5+
from .struct import Struct
6+
67
platforms = {
78
"linux": "libc.so.6",
89
"darwin": "libc.dylib",

src/pointers/bindings.py

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,17 @@
1-
from ._cstd import (
2-
dll,
3-
DivT,
4-
Tm,
5-
LDivT,
6-
Lconv,
7-
STRUCT_MAP,
8-
c_raise as ct_raise,
9-
c_malloc as _malloc,
10-
c_calloc as _calloc,
11-
c_realloc as _realloc,
12-
c_free as _free,
13-
)
1+
import ctypes
142
from typing import (
15-
Any,
16-
Union,
17-
TypeVar,
18-
Optional,
19-
TYPE_CHECKING,
20-
Dict,
21-
Type,
22-
Iterator,
23-
Tuple,
24-
)
25-
from .c_pointer import (
26-
VoidPointer,
27-
TypedCPointer,
28-
StructPointer,
29-
_BaseCPointer,
3+
TYPE_CHECKING, Any, Dict, Iterator, Optional, Tuple, Type, TypeVar, Union
304
)
31-
import ctypes
5+
326
from . import _cstd
7+
from ._cstd import STRUCT_MAP, DivT, Lconv, LDivT, Tm
8+
from ._cstd import c_calloc as _calloc
9+
from ._cstd import c_free as _free
10+
from ._cstd import c_malloc as _malloc
11+
from ._cstd import c_raise as ct_raise
12+
from ._cstd import c_realloc as _realloc
13+
from ._cstd import dll
14+
from .c_pointer import StructPointer, TypedCPointer, VoidPointer, _BaseCPointer
3315
from .exceptions import InvalidBindingParameter
3416
from .pointer import Pointer
3517

0 commit comments

Comments
 (0)