Skip to content

[psutil] Type the memory map and heap namedtuple fields - #16261

Open
ekanshul wants to merge 1 commit into
python:mainfrom
ekanshul:psutil-ntuples-types
Open

[psutil] Type the memory map and heap namedtuple fields#16261
ekanshul wants to merge 1 commit into
python:mainfrom
ekanshul:psutil-ntuples-types

Conversation

@ekanshul

Copy link
Copy Markdown
Contributor

The fields of the pmmap_grouped, pmmap_ext and pheap namedtuples in psutil._ntuples were all Incomplete, so Process.memory_maps() and heap_info() results were effectively untyped. At runtime addr, perms and path are strings (the address range and permission strings from /proc/<pid>/smaps, hex() of the base address on Windows) and every other field is a byte count, so this types them as str and int.

Agent used: Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant