Commit Graph
23 Commits
Author SHA1 Message Date
Alex WaygoodandGitHub 653f2c6ba4 Third-party stubs: import from collections.abc where possible (#7637) 2022-04-16 14:52:57 +01:00
Alex WaygoodandGitHub 740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
ShantanuandGitHub b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Alex WaygoodandGitHub 96c9abb058 Always use _typeshed.Self, where applicable (#6880)
* Always use `_typeshed.Self`, where applicable

* Revert changes to `google-cloud-ndb` (ambiguous)

* Remove empty line added by script

* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`

* Manually add a few more that the script missed

* Improve `filelock` annotation

Source code here: https://github.com/tox-dev/py-filelock/blob/79ec7b2826e33b982fe83b057f359448b9d966ba/src/filelock/_api.py#L207

* Improve `opentracing/scope` annotation

Source code here: https://github.com/opentracing/opentracing-python/blob/3e1d357a348269ef54d67f761302fab93dbfc0f7/opentracing/scope.py#L71

* Improve `redis/client` stub

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/client.py#L1217

* Improve `redis/lock` annotation

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/lock.py#L155

* Improve `requests/models` annotation

Source code here: https://github.com/psf/requests/blob/d718e753834b84018014a23d663369ac27d1ab9c/requests/models.py#L653
2022-01-09 19:16:19 -08:00
Alex WaygoodandGitHub 8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Anthony SottileandGitHub f9318703f3 fix typing for psutil sconn (#6669) 2021-12-22 20:22:13 -08:00
Alex WaygoodandGitHub c685c2d6c6 Reduce use of deprecated typing aliases (#6358) 2021-11-23 10:56:43 +01:00
Sebastian RittauandGitHub c846c35d50 Process.status returns a status string (#6245)
Typed STATUS_* constants using Literal
2021-11-07 15:04:27 -08:00
Sebastian RittauandGitHub 9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Saaket PrakashandGitHub 750d366767 Add missing annotations for psutil (#6124) 2021-10-07 11:43:19 +02:00
Nikita SobolevandGitHub 88cb22e952 Improves psutil (#6103)
Add a few items and annotations to psutil
2021-10-07 09:37:50 +02:00
Nikita SobolevandGitHub b84af5a4af Add several missing type annotations to psutil._common (#6104) 2021-10-05 14:30:00 +03:00
Jake BaileyandGitHub e19b20032b Properly export types from psutil._compat (#6112) 2021-10-04 17:11:45 -07:00
Nikita SobolevandGitHub a9227ed985 Improves Popen types in psutil (#6074) 2021-09-25 12:42:05 -07:00
Nikita SobolevandGitHub 583aa16876 Further improvements to psutil (#6072)
Adds types to the following functions:
- `psutil.environ()`
- `psutil.send_signal()`
- `psutil.sensors_temperatures()`
- `psutil.sensors_fans()`
- `psutil.sensors_battery()`
2021-09-25 13:07:58 +03:00
Nikita SobolevandGitHub 2217ac8a8c Further annotations for the psutil module (#6066) 2021-09-24 10:56:15 +02:00
Nikita SobolevandGitHub 7d41e670ad Annotate more NamedTuples for psutil (#6021) 2021-09-10 14:14:36 +02:00
Nikita SobolevandGitHub 6122b5e8b4 Annotate several NamedTuples in psutil (#6016) 2021-09-09 22:37:00 +02:00
Nikita SobolevandGitHub 2a6f4afc80 Annotate more methods of psutil.Process (#6012) 2021-09-09 21:30:56 +02:00
Nikita SobolevandGitHub 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 SobolevandGitHub 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 SobolevandGitHub 5d7e201784 Fix return type of Process.oneshot() (#6006) 2021-09-05 21:03:45 +02:00
Jukka LehtosaloandGitHub 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