Commit Graph

4 Commits

Author SHA1 Message Date
Nikita Sobolev 6188a3eec7 Improves psutil/_common.pyi (#6010)
* Improves `psutil/_common.pyi`

In this iteration I've fixed the most obvious types and corrected several mistakes.
We can go deeper in the next iteration(s).

* We don't need to import `Union`

* Update _common.pyi

* Update _common.pyi

* Update _common.pyi
2021-09-06 20:37:53 +02:00
Nikita Sobolev 1f7b87b6b7 Adds more missing ContextManager types (#6007)
1. https://github.com/giampaolo/psutil/blob/c3e63b4dd59f1724a7fa29371e53dfa7f46cbcd3/psutil/_psbsd.py#L571
2. https://github.com/giampaolo/psutil/blob/c3e63b4dd59f1724a7fa29371e53dfa7f46cbcd3/psutil/_psosx.py#L365
2021-09-05 17:57:33 -07:00
Nikita Sobolev 5d7e201784 Fix return type of Process.oneshot() (#6006) 2021-09-05 21:03:45 +02:00
Jukka Lehtosalo e2fe224b52 Stubs for psutil (#5776)
I generated these using stubgen and made various manual tweaks to fix issues
reported by stubtest.

Some of the submodules with underscore prefixes are used by open source code,
so I'm including them.

Various definitions are platform-specific. I added some sys.platform checks, but
it's hard to get these right. We may need to iterate on them later.
2021-07-15 11:37:53 +01:00