Commit Graph
85 Commits
Author SHA1 Message Date
Nikita Sobolev 989fe11806 Use Literal type and improve callbacks in gc (#6950) 2022-01-18 17:32:19 +01:00
Nikita Sobolev 3cbdb5a1d2 Add __all__ to dis (#6947) 2022-01-18 06:56:24 -08:00
Nikita Sobolev b47e97f2ea Add __all__ to opcode and use Literal for constants (#6945) 2022-01-18 12:08:54 +02:00
Nikita Sobolev 61d876e4ea Improve contextvars.Context not to use Any where possible (#6942) 2022-01-17 14:56:04 -08:00
Nikita Sobolev 18d746b6b0 Use ParamSpec for contextvars.Context.run (#6940) 2022-01-17 14:00:21 -08:00
Nikita Sobolev 141ac273ae Remove Any from array.pyi (#6922) 2022-01-15 15:30:58 -08:00
Nikita Sobolev 74d043b9bb Use Literal type in io and _compression (#6917) 2022-01-14 11:32:07 -08:00
Nikita Sobolev cfcabfd33d Use Literal types in ftplib (#6914) 2022-01-14 13:36:48 +01:00
Nikita Sobolev f42de016b8 Remove misleading comment from staticmethod and classmethod (#6907) 2022-01-13 12:59:28 +01:00
Nikita Sobolev e8cc83e62e Use Literal type in configparser (#6900) 2022-01-12 08:18:24 -08:00
Nikita Sobolev d108c19675 Use Literal type in datetime (#6899) 2022-01-12 08:12:23 -08:00
Nikita Sobolev 3101849451 Use Literal type in winsound (#6891) 2022-01-11 04:26:37 -08:00
Nikita Sobolev a8c9c194b4 Improve cmp_op in opcode (#6884) 2022-01-10 12:07:04 +01:00
Nikita Sobolev bb6a6e3421 Use Literal and __all__ in binhex (#6845) 2022-01-09 18:34:44 +01:00
Nikita Sobolev 34426dbc20 Change get_cache_token to return a NewType in _py_abc (#6872) 2022-01-09 18:33:45 +01:00
Nikita Sobolev da3292d271 Use Literal type for BOM_* constants in codecs.pyi (#6873) 2022-01-09 18:31:15 +01:00
Nikita Sobolev afb265ce84 Improve bdb with Literal and __all__ (#6844) 2022-01-09 18:40:35 +02:00
Nikita Sobolev 35c1d4f879 Remove __slots__ from builtins.object (#6800) 2022-01-09 18:27:24 +02:00
Nikita Sobolev daf5b7a4af Adds Literal and __all__ to cmd.pyi (#6847) 2022-01-09 18:21:02 +02:00
Nikita Sobolev 1fbc919ec8 Use Literal and __all__ in filecmp (#6852) 2022-01-08 13:07:33 +01:00
Nikita Sobolev c4a68faf6c Use Literal type in codecs (#6857) 2022-01-08 12:57:57 +01:00
Nikita Sobolev 28a5e6bb7a Stricter platform checks for constants in fcntl (#6807) 2022-01-07 19:40:13 +01:00
Nikita Sobolev 5103f23de3 Fixes asyncio.events definition (#6811) 2022-01-07 19:25:12 +02:00
Nikita Sobolev fe75ec69bf Use ParamSpec for concurent.futures.Executor.submit (#6791) 2022-01-06 18:29:47 +02:00
Nikita Sobolev a58a5bbed6 Use pos-only arguments in asyncio.gather (#6834) 2022-01-05 23:50:56 +02:00
Nikita Sobolev ca7e0964c4 Use Literal types in csv (#6823) 2022-01-05 11:29:01 +01:00
Nikita Sobolev 73d5098e0b Use Literal types in ast (#6824) 2022-01-05 11:27:58 +01:00
Nikita Sobolev 1527f67207 Use Literal types in calendar, add __all__ (#6827) 2022-01-05 11:26:29 +01:00
Nikita Sobolev 44f9e36952 asyncio.unix_events is not available on Windows (#6809) 2022-01-04 18:25:29 +02:00
Nikita Sobolev 4c61bdbccb multiprocessing.pool: Use Literal and add __all__ (#6815) 2022-01-04 18:20:06 +02:00
Nikita SobolevandAlex Waygood 73302d3bb8 Improve pty.pyi (#6806)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-04 11:12:27 +02:00
Nikita Sobolev 6e45c3196d Mark several asyncio modules as Windows-only (#6796) 2022-01-03 14:52:39 +01:00
Nikita Sobolev 96c836fc41 Use Literal types in windows_events (#6792) 2022-01-03 10:23:29 +01:00
Nikita Sobolev 0441c880b9 Use Literal in asyncio/constants.pyi (#6788) 2022-01-02 23:44:51 +01:00
Nikita Sobolev bbd8c77b16 Use "async def" in asyncio/tasks.pyi (#6783) 2022-01-02 16:22:05 +01:00
Nikita Sobolev 03861b5a1d Use Literal type for constans in asyncio/tasks (#6781) 2022-01-02 12:42:00 +02:00
Nikita Sobolev 686dba35b5 Use Literal type for concurrent states (#6780) 2022-01-02 12:27:02 +02:00
Nikita Sobolev 764abe8cff Add .editorconfig file (#6771) 2022-01-01 13:31:10 +01:00
Nikita Sobolev 6da5eb2d04 Backport platform specific code to python2 (#6772) 2022-01-01 13:26:20 +01:00
Nikita Sobolev 6bdc158e61 Use Literal types in syslog (#6774) 2022-01-01 14:19:05 +02:00
Nikita Sobolev f65d93618d Mark bdist_msi to be Windows-only on python2 (#6768) 2021-12-31 13:15:47 +01:00
Nikita Sobolev 9c8f0d1240 Restore Literal for CO_* constants in inspect.pyi (#6766)
First pushed in #6764, accidentally reverted in #6765
2021-12-30 17:00:35 -06:00
Nikita Sobolev caee9b0bea inspect.Parameter: several attributes are read-only (#6765) 2021-12-30 16:02:46 -06:00
Nikita Sobolev 113cd0d49c Use Literal for CO_* constants in inspect.pyi (#6764) 2021-12-30 22:50:10 +01:00
Nikita SobolevandAlex Waygood 026b219a1d Literal types in inspect: getcoroutinestate and getgeneratorstate (#6759)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-12-30 20:40:50 +02:00
Nikita Sobolev 8f13f94605 Re-export _stat.pyi symbols in stat.pyi (#6758) 2021-12-30 19:10:41 +02:00
Nikita Sobolev 971a738c8e Add more constants to _winapi (#6754) 2021-12-30 17:06:58 +02:00
Nikita Sobolev 6ca1dad2a2 Use Literal types for _winapi (#6752) 2021-12-30 14:04:42 +01:00
Nikita Sobolev 7c4f2a20cc Use Literal types in winreg (#6751) 2021-12-30 13:00:44 +01:00
Nikita Sobolev 3d4759efdf Now winreg is platform specific (#6735) 2021-12-30 12:26:09 +02:00
Nikita Sobolev d62b32cf8f Make _winapi Windows only (#6750) 2021-12-29 22:55:37 -06:00
Nikita Sobolev 06af4a8d88 mimetypes.guess_type() accepts PathLikes in 3.8+ (#6716) 2021-12-28 11:34:49 +01:00
Nikita Sobolev de8beb1399 Run shellcheck on generate_proto_stubs.sh (#6709) 2021-12-26 23:41:05 +01:00
Nikita Sobolev 1e15f38578 Improve stat.py module with Literal values (#6705) 2021-12-26 21:12:33 +02:00
Nikita Sobolev 0b3ee9808c exc_traceback in TracebackException can be None (#6693) 2021-12-26 12:11:11 +02:00
Nikita Sobolev 1311657434 Remove inherited methods from webbrowser.pyi (#6673) 2021-12-23 12:36:25 +01:00
Nikita Sobolev b1f0271da6 Add EnumType to enum.pyi on Python 3.11 (#6568) 2021-12-11 19:13:32 +02:00
Nikita SobolevandAkuli d0ce310f55 Make ctypes.Array abstract (#6361)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-11-28 22:42:23 +02:00
Nikita Sobolev 1278fa86e2 Update pytype (#6381)
It is required to solve https://github.com/python/typeshed/pull/6361
2021-11-25 15:06:19 -08:00
Nikita Sobolev a2f0dbfb2b Do not use ClassVars with generic variables (#6348) 2021-11-21 07:20:05 -08:00
Nikita Sobolev 3db6ac2d7b Now add= in tkinter.pyi can be '' or '+' (#6334) 2021-11-18 21:13:10 +02:00
Nikita Sobolev cb64e814a1 Adds missing constants to sqlite3.dbapi2 (#6279) 2021-11-12 12:14:37 +01:00
Nikita Sobolev 151f256051 croniter: Add missing arguments and functions, add types (#6215) 2021-10-30 18:50:20 +02:00
Nikita Sobolev 0e24e1fe66 Add redis/sentinel.pyi (#6174) 2021-10-15 12:04:56 +02:00
Nikita Sobolev 2eadf9c174 Annotate PIL.ImageColor (#6151) 2021-10-11 18:20:02 +02:00
Nikita Sobolev 023c4dff67 Color arguments also take (r,g,b,a) tuples (#6148) 2021-10-11 14:56:59 +02:00
Nikita Sobolev 0142ea8b52 Add Redis.memory_purge() (#6138) 2021-10-09 17:02:28 +02:00
Nikita Sobolev 90f6727516 Add memory_stats() to Redis (#6137) 2021-10-09 11:57:59 +02:00
Nikita Sobolev 373c4e582a traceback can be None in sys.excepthook (#6133) 2021-10-08 09:17:32 +00:00
Nikita Sobolev 88cb22e952 Improves psutil (#6103)
Add a few items and annotations to psutil
2021-10-07 09:37:50 +02:00
Nikita Sobolev b84af5a4af Add several missing type annotations to psutil._common (#6104) 2021-10-05 14:30:00 +03:00
Nikita Sobolev 4ac969ad2c Fixes __init__ of typing.NamedTuple (#6080)
Closes #6079
2021-09-28 20:42:27 -07:00
Nikita Sobolev b905dd2945 Specify concrete types for DateDataParser attributes (#6075) 2021-09-27 10:21:28 +02:00
Nikita Sobolev a9227ed985 Improves Popen types in psutil (#6074) 2021-09-25 12:42:05 -07:00
Nikita Sobolev 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 Sobolev 2217ac8a8c Further annotations for the psutil module (#6066) 2021-09-24 10:56:15 +02:00
Nikita Sobolev 3bc309daaa Adds AM_STR and PM_STR to locale.py (#6065) 2021-09-24 10:51:33 +02:00
Nikita Sobolev 392c81d767 Switch from toml to tomli (#6023) 2021-09-10 15:48:15 +02:00
Nikita Sobolev 7d41e670ad Annotate more NamedTuples for psutil (#6021) 2021-09-10 14:14:36 +02:00
Nikita Sobolev 6122b5e8b4 Annotate several NamedTuples in psutil (#6016) 2021-09-09 22:37:00 +02:00
Nikita Sobolev 2a6f4afc80 Annotate more methods of psutil.Process (#6012) 2021-09-09 21:30:56 +02:00
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
Nikita Sobolev 2b9dc7b9c2 Adds posonlyargs property to arguments for python3.8+ (#3390) 2019-10-19 23:07:04 +02:00