Skip to content

Commit 934b2b7

Browse files
committed
Fix typing stubs
1 parent f8db8a7 commit 934b2b7

1 file changed

Lines changed: 4 additions & 26 deletions

File tree

‎api/python/lief/runtime/__init__.pyi‎

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
import enum
21
from collections.abc import Iterator, Mapping
2+
import enum
33
from typing import Any, Final, Optional, overload
44

55
import lief
66
import lief.assembly
77
from lief.runtime import (
88
android as android,
9-
)
10-
from lief.runtime import (
119
linux as linux,
12-
)
13-
from lief.runtime import (
1410
osx as osx,
15-
)
16-
from lief.runtime import (
17-
windows as windows,
11+
windows as windows
1812
)
1913

2014

@@ -27,7 +21,6 @@ class ARCH(enum.Enum):
2721

2822
RISCV64 = 3
2923

30-
3124
class PLATFORMS(enum.Enum):
3225
NONE = 0
3326

@@ -41,14 +34,12 @@ class PLATFORMS(enum.Enum):
4134

4235
IOS = 5
4336

44-
4537
enabled: bool = ...
4638

4739
platform: PLATFORMS = ...
4840

4941
arch: ARCH = ...
5042

51-
5243
class Host:
5344
name: Final[str] = ...
5445

@@ -60,7 +51,6 @@ class Host:
6051

6152
cache_dir: Final[str] = ...
6253

63-
6454
class Process:
6555
class EnvVars:
6656
@property
@@ -84,7 +74,6 @@ class Process:
8474

8575
envs: Final[Process.EnvVars] = ...
8676

87-
8877
class Module:
8978
@property
9079
def name(self) -> str: ...
@@ -111,19 +100,14 @@ class Module:
111100

112101
def __str__(self) -> str: ...
113102

114-
115103
def modules() -> Iterator[Optional[Module]]: ...
116104

117-
118105
def module_from_name(name: str) -> Optional[Module]: ...
119106

120-
121107
def module_from_path(path: str) -> Optional[Module]: ...
122108

123-
124109
def module_from_addr(addr: int) -> Optional[Module]: ...
125110

126-
127111
class Memory:
128112
class MMAP_FLAGS(enum.IntFlag):
129113
def __repr__(self, /): ...
@@ -223,9 +207,7 @@ class Memory:
223207
def mmap(size: int, flags: int, permissions: int = 0) -> Memory.Chunk | None: ...
224208

225209
@staticmethod
226-
def mmap_hint(
227-
hint: int, size: int, flags: int, permissions: int = 0
228-
) -> Memory.Chunk | None: ...
210+
def mmap_hint(hint: int, size: int, flags: int, permissions: int = 0) -> Memory.Chunk | None: ...
229211

230212
@staticmethod
231213
def munmap(chunk: Memory.Chunk) -> lief.ok_error_t: ...
@@ -304,10 +286,6 @@ class Memory:
304286
@staticmethod
305287
def read_i64(addr: int) -> int: ...
306288

307-
308289
def disassemble(addr: int) -> Iterator[Optional[lief.assembly.Instruction]]: ...
309290

310-
311-
def assemble(
312-
address: int, assembly: str, config: lief.assembly.AssemblerConfig = ...
313-
) -> bytes: ...
291+
def assemble(address: int, assembly: str, config: lief.assembly.AssemblerConfig = ...) -> bytes: ...

0 commit comments

Comments
 (0)