Skip to content

Commit 68e011b

Browse files
committed
update python typings
1 parent 212ec11 commit 68e011b

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

python/memflow/memflow.pyi

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Optional, Type, Any, List
22

33
class Inventory:
4-
def __init__(path: Optional[str]) -> self: ...
4+
def __init__(self, path: Optional[str]) -> self: ...
55
def add_dir(self, path: str, filter: Optional[str]): ...
66
def available_os(self) -> List[str]: ...
77
def available_connectors(self) -> List[str]: ...
@@ -56,17 +56,49 @@ class Process:
5656
def read_ptr(self, ptr: Any) -> Any: ...
5757
def write(self, addr: int, type: Type[_CT], value: Any): ...
5858
def module_info_list(self) -> List[ModuleInfo]: ...
59-
def module_from_name(self, name: str) -> ModuleInfo: ...
59+
def module_by_name(self, name: str) -> ModuleInfo: ...
60+
def info(self) -> ProcessInfo: ...
6061

6162
class ProcessInfo:
63+
def __init__(
64+
self,
65+
address: int,
66+
pid: int,
67+
state: ProcessState,
68+
name: str,
69+
path: str,
70+
command_line: str,
71+
sys_arch: ArchitectureIdent,
72+
proc_arch: ArchitectureIdent,
73+
) -> self: ...
6274
@property
6375
def address(self) -> int: ...
6476
@property
6577
def name(self) -> str: ...
6678
@property
6779
def pid(self) -> int: ...
80+
@property
81+
def state(self) -> ProcessState: ...
82+
@property
83+
def path(self) -> str: ...
84+
@property
85+
def command_line(self) -> str: ...
86+
@property
87+
def sys_arch(self) -> ArchitectureIdent: ...
88+
@property
89+
def proc_arch(self) -> ArchitectureIdent: ...
6890

6991
class ModuleInfo:
92+
def __init__(
93+
self,
94+
name: str,
95+
address: int,
96+
base: int,
97+
size: int,
98+
path: str,
99+
process_addr: int,
100+
arch: ArchitectureIdent,
101+
) -> self: ...
70102
@property
71103
def address(self) -> int: ...
72104
@property
@@ -77,3 +109,21 @@ class ModuleInfo:
77109
def size(self) -> int: ...
78110
@property
79111
def path(self) -> str: ...
112+
@property
113+
def parent_process(self) -> int: ...
114+
@property
115+
def arch(self) -> ArchitectureIdent: ...
116+
117+
class ProcessState:
118+
def __init__(self, alive: bool, exit_code: Optional[int]) -> self: ...
119+
def is_alive(self) -> bool: ...
120+
def is_dead(self) -> bool: ...
121+
def is_unknown(self) -> bool: ...
122+
123+
class ArchitectureIdent:
124+
def __init__(
125+
self, arch: str, page_size: Optional[int], address_extensions: Optional[bool]
126+
) -> self: ...
127+
def is_alive(self) -> bool: ...
128+
def is_dead(self) -> bool: ...
129+
def is_unknown(self) -> bool: ...

0 commit comments

Comments
 (0)