Skip to content

Commit c956df4

Browse files
ekanshulclaude
andcommitted
[psutil] Add overloads for Process.memory_maps()
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e8b9e19 commit c956df4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

stubs/psutil/psutil/__init__.pyi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,13 @@ class Process:
177177
@overload
178178
def cpu_affinity(self, cpus: list[int]) -> None: ...
179179

180-
def memory_maps(self, grouped: bool = True) -> list[Incomplete]: ...
180+
@overload
181+
def memory_maps(self, grouped: Literal[True] = True) -> list[_ntp.pmmap_grouped]: ...
182+
@overload
183+
def memory_maps(self, grouped: Literal[False]) -> list[_ntp.pmmap_ext]: ...
184+
@overload
185+
def memory_maps(self, grouped: bool) -> list[_ntp.pmmap_grouped] | list[_ntp.pmmap_ext]: ...
186+
181187
if sys.platform == "linux":
182188
def rlimit(self, resource: int, limits: tuple[int, int] | None = None) -> tuple[int, int]: ...
183189
def cpu_num(self) -> int: ...

0 commit comments

Comments
 (0)