Skip to content
Open
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ repos:
args: [--fix=lf]
- id: check-case-conflict
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 12e63946db2c5cfcc9030fac21c3883ba88c6ed8 # frozen: 0.38.0
rev: 0494aa7fa1314e98913a41227d8f0a515b2c1049 # frozen: 0.38.2
hooks:
- id: check-github-workflows
- id: check-renovate
additional_dependencies: ["json5==0.15.0"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# The Ruff version must match requirements-tests.txt.
rev: c59bba8fb259db0fec2bbb77ad8ba51ea7341b56 # frozen: v0.15.20
rev: 2eeb5678de71a00c0902cbda7105d328432f72cb # frozen: v0.16.8
hooks:
- id: ruff
name: Run ruff on stubs, tests and scripts
Expand All @@ -38,7 +38,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: c48217e1fc006c2dddd14df54e83b67da15de5cd # frozen: 7.3.0
rev: 7eccf20b526fe4f2230bf9afeeef2fc9f97faf8d # frozen: 7.4.1
hooks:
- id: flake8
language: python
Expand All @@ -51,7 +51,7 @@ repos:
- id: check-hooks-apply
# zizmor detects security vulnerabilities in GitHub Actions workflows.
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: 451b56af716f9f0d0c2b816503a3fd0cf8b036fa # frozen: v1.29.0
rev: fa412071e4f5d44d44f9e365f4676f9df92456a2 # frozen: v1.30.1
hooks:
- id: zizmor
args: [--no-progress, --fix]
Expand Down
14 changes: 7 additions & 7 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Type checkers that we test our stubs against. These should always
# be pinned to a specific version to make failure reproducible.
mypy==2.3.0
pyrefly==1.3.0.dev1
mypy==2.3.1
pyrefly==1.3.1
pyright==1.1.414
ty==0.0.59
ty==0.0.83

# Libraries used by our various scripts.
aiohttp==3.14.3
grpcio-tools>=1.76.0; python_version < "3.15" # For grpc_tools.protoc
mypy-protobuf==5.1.0; python_version < "3.15"
packaging==26.2
packaging==26.3
pathspec>=1.1.1
pre-commit
ruff==0.15.20
ruff==0.16.8
# Required by create_baseline_stubs.py.
# stubdefaulter depends on libcst, which does not yet install cleanly on Python 3.15.
stubdefaulter==0.1.0; python_version < "3.15"
termcolor>=2.3
tomli==2.4.1; python_version < "3.11"
tomlkit==0.15.0
tomlkit==0.15.1
typing_extensions>=4.16.0rc2
uv==0.11.26
uv==0.12.18

# Utilities for typeshed infrastructure scripts.
ts_utils @ file:lib
2 changes: 1 addition & 1 deletion stdlib/_interpreters.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_config(id: SupportsIndex, *, restrict: bool = False) -> types.SimpleName
def whence(id: SupportsIndex) -> _Whence: ...
def exec(
id: SupportsIndex, code: str | types.CodeType | Callable[[], object], shared: _SharedDict = {}, *, restrict: bool = False
) -> None | types.SimpleNamespace: ...
) -> types.SimpleNamespace | None: ...
def call(
id: SupportsIndex,
callable: Callable[..., _R],
Expand Down
2 changes: 1 addition & 1 deletion stdlib/_ssl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class _SSLContext:
post_handshake_auth: bool
protocol: int
security_level: int
sni_callback: Callable[[SSLObject, str, SSLContext], None | int] | None
sni_callback: Callable[[SSLObject, str, SSLContext], int | None] | None
verify_flags: int
verify_mode: int
def __new__(cls, protocol: int, /) -> Self: ...
Expand Down
54 changes: 27 additions & 27 deletions stdlib/ast.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ if sys.version_info >= (3, 15):
mode: Literal["exec", "eval", "func_type", "single"] = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> _T: ...
Expand All @@ -1752,7 +1752,7 @@ if sys.version_info >= (3, 15):
mode: Literal["exec"] = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> Module: ...
Expand All @@ -1763,7 +1763,7 @@ if sys.version_info >= (3, 15):
mode: Literal["eval"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> Expression: ...
Expand All @@ -1774,7 +1774,7 @@ if sys.version_info >= (3, 15):
mode: Literal["func_type"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> FunctionType: ...
Expand All @@ -1785,7 +1785,7 @@ if sys.version_info >= (3, 15):
mode: Literal["single"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> Interactive: ...
Expand All @@ -1795,7 +1795,7 @@ if sys.version_info >= (3, 15):
*,
mode: Literal["eval"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> Expression: ...
Expand All @@ -1805,7 +1805,7 @@ if sys.version_info >= (3, 15):
*,
mode: Literal["func_type"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> FunctionType: ...
Expand All @@ -1815,7 +1815,7 @@ if sys.version_info >= (3, 15):
*,
mode: Literal["single"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> Interactive: ...
Expand All @@ -1826,7 +1826,7 @@ if sys.version_info >= (3, 15):
mode: str = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
module: str | None = None,
) -> mod: ...
Expand All @@ -1838,7 +1838,7 @@ elif sys.version_info >= (3, 13):
mode: Literal["exec", "eval", "func_type", "single"] = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> _T: ...
@overload
Expand All @@ -1848,7 +1848,7 @@ elif sys.version_info >= (3, 13):
mode: Literal["exec"] = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> Module: ...
@overload
Expand All @@ -1858,7 +1858,7 @@ elif sys.version_info >= (3, 13):
mode: Literal["eval"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> Expression: ...
@overload
Expand All @@ -1868,7 +1868,7 @@ elif sys.version_info >= (3, 13):
mode: Literal["func_type"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> FunctionType: ...
@overload
Expand All @@ -1878,7 +1878,7 @@ elif sys.version_info >= (3, 13):
mode: Literal["single"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> Interactive: ...
@overload
Expand All @@ -1887,7 +1887,7 @@ elif sys.version_info >= (3, 13):
*,
mode: Literal["eval"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> Expression: ...
@overload
Expand All @@ -1896,7 +1896,7 @@ elif sys.version_info >= (3, 13):
*,
mode: Literal["func_type"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> FunctionType: ...
@overload
Expand All @@ -1905,7 +1905,7 @@ elif sys.version_info >= (3, 13):
*,
mode: Literal["single"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> Interactive: ...
@overload
Expand All @@ -1915,7 +1915,7 @@ elif sys.version_info >= (3, 13):
mode: str = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
optimize: Literal[-1, 0, 1, 2] = -1,
) -> mod: ...
else:
Expand All @@ -1926,7 +1926,7 @@ else:
mode: Literal["exec", "eval", "func_type", "single"] = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> _T: ...
@overload
def parse(
Expand All @@ -1935,7 +1935,7 @@ else:
mode: Literal["exec"] = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> Module: ...
@overload
def parse(
Expand All @@ -1944,7 +1944,7 @@ else:
mode: Literal["eval"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> Expression: ...
@overload
def parse(
Expand All @@ -1953,7 +1953,7 @@ else:
mode: Literal["func_type"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> FunctionType: ...
@overload
def parse(
Expand All @@ -1962,31 +1962,31 @@ else:
mode: Literal["single"],
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> Interactive: ...
@overload
def parse(
source: str | ReadableBuffer,
*,
mode: Literal["eval"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> Expression: ...
@overload
def parse(
source: str | ReadableBuffer,
*,
mode: Literal["func_type"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> FunctionType: ...
@overload
def parse(
source: str | ReadableBuffer,
*,
mode: Literal["single"],
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> Interactive: ...
@overload
def parse(
Expand All @@ -1995,7 +1995,7 @@ else:
mode: str = "exec",
*,
type_comments: bool = False,
feature_version: None | int | tuple[int, int] = None,
feature_version: int | tuple[int, int] | None = None,
) -> mod: ...

def literal_eval(node_or_string: str | AST) -> Any: ...
Expand Down
24 changes: 12 additions & 12 deletions stdlib/asyncio/subprocess.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ if sys.version_info >= (3, 11):
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = (),
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
group: str | int | None = None,
extra_groups: Collection[str | int] | None = None,
user: str | int | None = None,
umask: int = -1,
process_group: int | None = None,
pipesize: int = -1,
Expand Down Expand Up @@ -93,9 +93,9 @@ if sys.version_info >= (3, 11):
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = (),
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
group: str | int | None = None,
extra_groups: Collection[str | int] | None = None,
user: str | int | None = None,
umask: int = -1,
process_group: int | None = None,
pipesize: int = -1,
Expand Down Expand Up @@ -127,9 +127,9 @@ else:
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = (),
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
group: str | int | None = None,
extra_groups: Collection[str | int] | None = None,
user: str | int | None = None,
umask: int = -1,
pipesize: int = -1,
) -> Process: ...
Expand Down Expand Up @@ -158,9 +158,9 @@ else:
restore_signals: bool = True,
start_new_session: bool = False,
pass_fds: Collection[int] = (),
group: None | str | int = None,
extra_groups: None | Collection[str | int] = None,
user: None | str | int = None,
group: str | int | None = None,
extra_groups: Collection[str | int] | None = None,
user: str | int | None = None,
umask: int = -1,
pipesize: int = -1,
) -> Process: ...
2 changes: 1 addition & 1 deletion stdlib/cgi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class FieldStorage:
length: int
done: int
list: _list[Any] | None
value: None | bytes | _list[Any]
value: bytes | _list[Any] | None
def __init__(
self,
fp: IO[Any] | None = None,
Expand Down
Loading
Loading