From 8cd6d81f153879c1dd8d6ef569b1d5146757500e Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 15 Feb 2023 10:54:36 +0100 Subject: [PATCH] Bump pyright to 1.1.294; improve `psutil` stubs (#9739) Partially type psfullmem --- pyproject.toml | 2 +- stubs/psutil/psutil/_pslinux.pyi | 12 +++++++++++- stubs/psutil/psutil/_psosx.pyi | 7 ++++++- stubs/psutil/psutil/_pswindows.pyi | 15 ++++++++++++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6a013034f1a7..1484710f4117 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,4 +62,4 @@ all = true disable_all_dunder_policy = true [tool.typeshed] -pyright_version = "1.1.292" +pyright_version = "1.1.294" diff --git a/stubs/psutil/psutil/_pslinux.pyi b/stubs/psutil/psutil/_pslinux.pyi index e6cc75e8a05c..b6502d083d41 100644 --- a/stubs/psutil/psutil/_pslinux.pyi +++ b/stubs/psutil/psutil/_pslinux.pyi @@ -84,7 +84,17 @@ class pmem(NamedTuple): data: Any dirty: Any -pfullmem: Any +class pfullmem(NamedTuple): + rss: Incomplete + vms: Incomplete + shared: Incomplete + text: Incomplete + lib: Incomplete + data: Incomplete + dirty: Incomplete + uss: Incomplete + pss: Incomplete + swap: Incomplete class pmmap_grouped(NamedTuple): path: Any diff --git a/stubs/psutil/psutil/_psosx.pyi b/stubs/psutil/psutil/_psosx.pyi index 289743ae8571..895d66f79a57 100644 --- a/stubs/psutil/psutil/_psosx.pyi +++ b/stubs/psutil/psutil/_psosx.pyi @@ -42,7 +42,12 @@ class pmem(NamedTuple): pfaults: Any pageins: Any -pfullmem: Any +class pfullmem(NamedTuple): + rss: Incomplete + vms: Incomplete + pfaults: Incomplete + pageins: Incomplete + uss: Incomplete def virtual_memory() -> svmem: ... def swap_memory(): ... diff --git a/stubs/psutil/psutil/_pswindows.pyi b/stubs/psutil/psutil/_pswindows.pyi index 389a8e5e668e..8dd501d9925d 100644 --- a/stubs/psutil/psutil/_pswindows.pyi +++ b/stubs/psutil/psutil/_pswindows.pyi @@ -84,7 +84,20 @@ class pmem(NamedTuple): peak_pagefile: Any private: Any -pfullmem: Any +class pfullmem(NamedTuple): + rss: Incomplete + vms: Incomplete + num_page_faults: Incomplete + peak_wset: Incomplete + wset: Incomplete + peak_paged_pool: Incomplete + paged_pool: Incomplete + peak_nonpaged_pool: Incomplete + nonpaged_pool: Incomplete + pagefile: Incomplete + peak_pagefile: Incomplete + private: Incomplete + uss: Incomplete class pmmap_grouped(NamedTuple): path: Any