mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-09 18:09:17 +08:00
Update most test/lint dependencies (#14354)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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"
|
||||
@@ -8,23 +8,23 @@ pytype==2024.10.11; platform_system != "Windows" and python_version >= "3.10" an
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user