Commit Graph

9058 Commits

Author SHA1 Message Date
David Salvisberg
ea61ca5a30 [3.13] typing.(Async)ContextManager adds second type parameter (#11873)
This is in response to: https://github.com/python/cpython/pull/118681
2024-05-09 19:25:49 -07:00
Kanishk Pachauri
120f01dcb3 stubs: change psutil's Process.wait timeout argument to float (#11883)
Fixes #11866
2024-05-09 19:25:00 -07:00
renovate[bot]
72623c6b15 Update dependency pyright to v1.1.362 (#11877)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-08 19:32:21 -07:00
Javier Zazo
2d33fe2122 deprecate pathlib.Path.link_to (#11875)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-07 21:14:14 +01:00
Ed Younis
3e3fd0dd86 Changed logging.lastResort type to Handler (#11872) 2024-05-07 14:55:01 +02:00
Nikita Sobolev
16dadc8fb5 Add show_empty to ast.dump (#11871) 2024-05-07 12:42:16 +02:00
Kirill Podoprigora
74486c31a2 [3.13] Add optimize to ast.parse parameters (#11870) 2024-05-07 11:23:24 +02:00
Adam Dangoor
727f3c4320 Add return type to Docker Container.stop (#11869)
We can see at
b6464dbed9/docker/models/containers.py (L452)
that this returns the return value of `self.client.api.stop`.

We can see at
b6464dbed9/docker/api/container.py (L1187)
that this returns None.
2024-05-06 11:05:43 +02:00
Adam Dangoor
113b2ccd42 Add return type to Docker Container.remove (#11868) 2024-05-06 11:01:55 +02:00
github-actions[bot]
8ff50fbea2 [stubsabot] Bump Pygments to 2.18.* (#11861)
Release: https://pypi.org/pypi/Pygments/2.18.0
Homepage: https://pygments.org
Repository: https://github.com/pygments/pygments
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/Pygments
Changelog: https://github.com/pygments/pygments/blob/master/CHANGES
Diff: https://github.com/pygments/pygments/compare/2.17.2...2.18.0

Stubsabot analysis of the diff between the two releases:
 - 5 public Python files have been added: `pygments/lexers/mojo.py`, `pygments/lexers/soong.py`, `pygments/lexers/tact.py`, `pygments/lexers/typst.py`, `pygments/styles/coffee.py`.
 - 0 files included in typeshed's stubs have been deleted.
 - 36 files included in typeshed's stubs have been modified or renamed.
 - Total lines of Python code added: 4858.
 - Total lines of Python code deleted: 2467.

If stubtest fails for this PR:
- Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR)
- Fix stubtest failures in another PR, then close this PR

Note that you will need to close and re-open the PR in order to trigger CI

Co-authored-by: stubsabot <>
2024-05-05 07:39:39 -07:00
Sebastian Rittau
e436dfe219 Unify test directory handling (#11864)
Previously, handling of test directories (`@tests` and `test_cases`) was
distributed over multiple files and redundant. This unifies the handling
in the `utils` module. This also fixes some instances where "package"
was used instead of "distribution". And in a few instances paths were
joined by using a `/` in a string, which is incompatible with Windows.

Also move `runtests.py` from `scripts` to `tests`. This is required so that
we can import `utils`, but it's also arguably the better fit. The only
mention of the script is actually in the `tests/README.md` file.

Helps with #11762.
2024-05-05 16:28:37 +02:00
kasium
4005c2f214 Improve types in docker models (#11859) 2024-05-05 12:32:37 +02:00
Arthur Bols
32ab6813bc regex: improve Pattern annotations (#11862)
- Corrected types for `pos` and `endpos` arguments to `int | None = None`
- Corrected type for `timeout` argument to `float | None = None`
- Added default value `None` for `concurrent` and `timeout` parameters
- Added default value `0` for `maxsplit` parameter
- Added `partial` parameter where applicable
- Removed invalid `flags` parameter from `sub` methods
2024-05-04 19:39:35 -07:00
Jelle Zijlstra
9c8c9c769c Add stubs for unidiff (#11860) 2024-05-04 17:33:09 +02:00
Philipp
a3f7c2b235 Add indent argument to HTMLFormatter and XMLFormatter inits (#11855) 2024-05-03 08:41:32 +02:00
renovate[bot]
8c0fc298c5 Update dependency pyright to v1.1.361 (#11858) 2024-05-02 18:39:24 -07:00
Adam Dangoor
5883898b0a [docker-py] Add return type for building a Docker image (#11851) 2024-05-02 10:08:32 +02:00
github-actions[bot]
2ac3ad9fcd [stubsabot] Bump jsonschema to 4.22.* (#11850)
Release: https://pypi.org/pypi/jsonschema/4.22.0
Homepage: https://github.com/python-jsonschema/jsonschema
Repository: https://github.com/python-jsonschema/jsonschema
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/jsonschema
Changelog: https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst
Diff: https://github.com/python-jsonschema/jsonschema/compare/v4.21.1...v4.22.0

Stubsabot analysis of the diff between the two releases:
 - 3 public Python files have been added: `jsonschema/benchmarks/const_vs_enum.py`, `jsonschema/benchmarks/useless_applicator_schemas.py`, `jsonschema/benchmarks/useless_keywords.py`.
 - 0 files included in typeshed's stubs have been deleted.
 - 6 files included in typeshed's stubs have been modified or renamed: `jsonschema/_format.py`, `jsonschema/_types.py`, `jsonschema/_utils.py`, `jsonschema/exceptions.py`, `jsonschema/protocols.py`, `jsonschema/validators.py`.
 - Total lines of Python code added: 313.
 - Total lines of Python code deleted: 21.
2024-04-30 18:14:38 -07:00
kasium
f244be921e Improve docker api types (#11846) 2024-04-30 13:43:08 +02:00
Marc Mueller
9178f5a414 Use TypeIs for asyncio function (#11847) 2024-04-29 15:17:09 -07:00
kasium
78a86de5d9 Add types to docker/context (#11818) 2024-04-29 14:27:55 +02:00
github-actions[bot]
6dc9187625 [stubsabot] Bump regex to 2024.4.28 (#11842)
Release: https://pypi.org/pypi/regex/2024.4.28
Homepage: https://github.com/mrabarnett/mrab-regex
Repository: https://github.com/mrabarnett/mrab-regex
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/regex
Diff: https://github.com/mrabarnett/mrab-regex/compare/2024.4.16...2024.4.28

Stubsabot analysis of the diff between the two releases:
 - Total lines of Python code added: 10.
 - Total lines of Python code deleted: 7.
2024-04-29 07:11:02 +01:00
Avasam
bdf75023df openpyxl: Use duck typing for workbook sheets (#11718) 2024-04-27 15:16:22 +02:00
Sebastian Rittau
caeb45a9df Use apt-get to install packages (#11824) 2024-04-27 14:25:22 +02:00
Alex Waygood
2db0b6e655 Fix stubtest for TensorFlow with latest keras release (#11838) 2024-04-27 09:42:34 +01:00
github-actions[bot]
147aa2491b [stubsabot] Bump flake8-bugbear to 24.4.26 (#11836)
Release: https://pypi.org/pypi/flake8-bugbear/24.4.26
Homepage: https://github.com/PyCQA/flake8-bugbear
Repository: https://github.com/PyCQA/flake8-bugbear
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/flake8-bugbear
Changelog: https://github.com/PyCQA/flake8-bugbear#change-log
Diff: https://github.com/PyCQA/flake8-bugbear/compare/24.4.21...24.4.26

Stubsabot analysis of the diff between the two releases:
 - 0 public Python files have been added.
 - 0 files included in typeshed's stubs have been deleted.
 - 1 file included in typeshed's stubs has been modified or renamed: `bugbear.py`.
 - Total lines of Python code added: 74.
 - Total lines of Python code deleted: 4.
2024-04-27 09:00:14 +01:00
Jelle Zijlstra
1dff589dd4 Use TypeIs for various stdlib functions (#11823) 2024-04-26 16:43:19 -07:00
bersbersbers
48a68f521e pyinstaller: allow Splash(text_pos = None) (#11835) 2024-04-25 22:42:18 +02:00
Kaleb Barrett
9ca0b20529 Make Awaitable.__await__'s result type's send arg Any (#11788) 2024-04-25 07:09:33 -07:00
Patrick Rauscher
71f020d174 add annotation for multiprocessing.{Value,Array} with special c-types (#11833) 2024-04-25 12:43:44 +02:00
Anuraag (Rag) Agrawal
273e9ea6dd Fix comment referencing incorrect type name (#11832) 2024-04-24 18:54:17 -07:00
Thanos
aed7081297 Use typing_extensions.Buffer in audioop (#11831)
More accurate to what audioop actually takes as input in C.
2024-04-24 09:32:30 -07:00
Sebastian Rittau
e2e14d1cc1 [networkx] Fix incremental_closeness_centrality argument type (#11828) 2024-04-24 17:00:56 +02:00
Sebastian Rittau
8664482849 Bump OpenSSL to 24.1.* (#11816)
Mark a few classes and functions as deprecated

Closes: #11812
2024-04-24 07:58:52 -07:00
Jelle Zijlstra
f40076c0da Upgrade to mypy 1.10.0 (#11829) 2024-04-24 07:48:40 -07:00
Sebastian Rittau
f646eb86e2 Introduce SupportsContainsAndGetItem (#11827) 2024-04-24 16:19:12 +02:00
Alex Waygood
d0f2be92ab Bump pyright to v1.1.360 (#11810) 2024-04-24 14:09:16 +02:00
Shantanu
29db988c0a Disable uwsgi, pyaudio, jack-client stubtest on macOS (#11821) 2024-04-24 08:10:33 +02:00
Sebastian Rittau
7ed91bc2e7 Add _typeshed.MaybeNone as Any trick marker (#11815)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2024-04-23 17:13:25 -04:00
P M
ed7f35a2bc Add peewee playhouse.flask_utils stubs (#11731)
Co-authored-by: Avasam <samuel.06@hotmail.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2024-04-23 15:26:36 -04:00
Sebastian Rittau
56db30e8eb Make email.message.Message generic over the header type (#11732)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2024-04-23 11:41:10 -04:00
Alex Waygood
c13f6e166d Fix stubtest errors in tensorflow with keras>=3.3.2 (#11817) 2024-04-23 13:26:02 +02:00
Daniel Darabos
af88af1fa6 Annotate a few NetworkX algorithm types (#11811) 2024-04-23 11:48:49 +02:00
kasium
312dfe5791 Fully type docker/api/build (#11789) 2024-04-23 08:34:19 +02:00
Avasam
7858e6058b Bump waitress to 3.0.* (#11803) 2024-04-22 17:24:08 +02:00
Matthew Leather
bd8843a775 paramiko: Replace str with FileDescriptorOrPath in many locations (#11800) 2024-04-22 16:49:03 +02:00
David Salvisberg
f274c78fe5 Make ExitStack, AbstractContextManager and AsyncAbstractContextManager generic in return type of __exit__ (#11048) 2024-04-22 16:43:08 +02:00
Avasam
b3bfdadb45 Bump tensorflow to 2.16.* (#11696) 2024-04-22 16:37:33 +02:00
Eric Traut
17f1c4628a Add precise values for enum members where possible (#11299)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2024-04-22 15:10:59 +01:00
Avasam
b3bfbefa7f Create script to generate s2clientprotocol protobuf stubs (#11772)
Regenerate using mypy-protobuf 3.6
2024-04-22 15:05:21 +02:00