Skip to content

Update most test/lint dependencies #14354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
args: [--fix=lf]
- id: check-case-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.4 # must match requirements-tests.txt
rev: v0.12.1 # must match requirements-tests.txt
hooks:
- id: ruff
name: Run ruff on stubs, tests and scripts
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ ignore = [
# Used for direct, non-subclass type comparison, for example: `type(val) is str`
# see https://github.com/astral-sh/ruff/issues/6465
"E721", # Do not compare types, use `isinstance()`
# Highly opinionated, and it's often necessary to violate it
"PLC0415", # `import` should be at the top-level of a file
# Leave the size and complexity of tests to human interpretation
"PLR09", # Too many ...
# Too many magic number "2" that are preferable inline. https://github.com/astral-sh/ruff/issues/10009
Expand Down
12 changes: 6 additions & 6 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Type checkers that we test our stubs against. These should always
# be pinned to a specific version to make failure reproducible.
mypy==1.16.0
mypy==1.16.1
pyright==1.1.400
# pytype can be installed on Windows, but requires building wheels, let's not do that on the CI
pytype==2024.10.11; platform_system != "Windows" and python_version >= "3.10" and python_version < "3.13"

# Libraries used by our various scripts.
# TODO (2025-05-09): Installing this on Python 3.14 on Windows fails at
# the moment.
aiohttp==3.11.15; python_version < "3.14"
aiohttp==3.12.13; python_version < "3.14"
# TODO (2025-05-09): No wheels exist for Python 3.14 yet, slowing down CI
# considerably and prone to fail.
grpcio-tools>=1.66.2; python_version < "3.14" # For grpc_tools.protoc
mypy-protobuf==3.6.0
packaging==24.2
packaging==25.0
pathspec>=0.11.1
pre-commit
# Required by create_baseline_stubs.py. Must match .pre-commit-config.yaml.
ruff==0.11.4
ruff==0.12.1
# TODO (2025-05-07): Dependency libcst doesn't support Python 3.14 yet.
stubdefaulter==0.1.0; python_version < "3.14"
termcolor>=2.3
tomli==2.2.1
tomlkit==0.13.2
tomlkit==0.13.3
typing_extensions>=4.14.0rc1
uv==0.7.4
uv==0.7.17

# Utilities for typeshed infrastructure scripts.
ts_utils @ file:lib
2 changes: 1 addition & 1 deletion stdlib/asyncio/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ruff: noqa: PLR5501 # This condition is so big, it's clearer to keep to platform condition in two blocks
# This condition is so big, it's clearer to keep to platform condition in two blocks
# Can't NOQA on a specific line: https://github.com/plinss/flake8-noqa/issues/22
import sys
from collections.abc import Awaitable, Coroutine, Generator
Expand Down
1 change: 0 additions & 1 deletion stdlib/typing.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Since this module defines "overload" it is not recognized by Ruff as typing.overload
# ruff: noqa: F811
# TODO: The collections import is required, otherwise mypy crashes.
# https://github.com/python/mypy/issues/16744
import collections # noqa: F401 # pyright: ignore[reportUnusedImport]
Expand Down
2 changes: 1 addition & 1 deletion tests/pyright_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main() -> None:
# version installed into the virtual environment, due to failures on some
# platforms. https://github.com/python/typeshed/issues/11614
os.environ["PYRIGHT_PYTHON_FORCE_VERSION"] = pyright_version
command = [npx, f"pyright@{pyright_version}"] + sys.argv[1:]
command = [npx, f"pyright@{pyright_version}", *sys.argv[1:]]
print_command(command)

ret = subprocess.run(command, check=False).returncode
Expand Down