1- import enum
21from collections .abc import Iterator , Mapping
2+ import enum
33from typing import Any , Final , Optional , overload
44
55import lief
66import lief .assembly
77from 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-
3124class PLATFORMS (enum .Enum ):
3225 NONE = 0
3326
@@ -41,14 +34,12 @@ class PLATFORMS(enum.Enum):
4134
4235 IOS = 5
4336
44-
4537enabled : bool = ...
4638
4739platform : PLATFORMS = ...
4840
4941arch : ARCH = ...
5042
51-
5243class Host :
5344 name : Final [str ] = ...
5445
@@ -60,7 +51,6 @@ class Host:
6051
6152 cache_dir : Final [str ] = ...
6253
63-
6454class Process :
6555 class EnvVars :
6656 @property
@@ -84,7 +74,6 @@ class Process:
8474
8575 envs : Final [Process .EnvVars ] = ...
8676
87-
8877class Module :
8978 @property
9079 def name (self ) -> str : ...
@@ -111,19 +100,14 @@ class Module:
111100
112101 def __str__ (self ) -> str : ...
113102
114-
115103def modules () -> Iterator [Optional [Module ]]: ...
116104
117-
118105def module_from_name (name : str ) -> Optional [Module ]: ...
119106
120-
121107def module_from_path (path : str ) -> Optional [Module ]: ...
122108
123-
124109def module_from_addr (addr : int ) -> Optional [Module ]: ...
125110
126-
127111class 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-
308289def 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