Skip to content

Refine the copy._SupportsReplace.__replace__ signature #33344

Refine the copy._SupportsReplace.__replace__ signature

Refine the copy._SupportsReplace.__replace__ signature #33344

Triggered via pull request September 26, 2025 00:06
Status Failure
Total duration 5m 18s
Artifacts

tests.yml

on: pull_request
Check typeshed structure
11s
Check typeshed structure
mypy: Run test cases
4m 45s
mypy: Run test cases
stub_uploader tests
5m 15s
stub_uploader tests
Matrix: mypy: Check stubs
Matrix: pyright: Run test cases
Fit to window
Zoom out
Zoom in

Annotations

10 errors
pyright: Run test cases (Darwin, 3.13)
Exit code 1
pyright: Run test cases (Windows, 3.13)
Exit code 1
pyright: Run test cases (Darwin, 3.14)
Exit code 1
pyright: Run test cases (Linux, 3.14)
Exit code 1
pyright: Run test cases (Linux, 3.13)
3 errors
pyright: Run test cases (Linux, 3.13): stdlib/@tests/test_cases/check_copy.py#L21
"assert_type" mismatch: expected "ReplaceableClass" but received "Unknown" (reportAssertTypeFailure)
pyright: Run test cases (Linux, 3.13): stdlib/@tests/test_cases/check_copy.py#L20
Argument of type "ReplaceableClass" cannot be assigned to parameter "obj" of type "_SR@replace" in function "replace"   Type "ReplaceableClass" is not assignable to type "_SupportsReplace"     "ReplaceableClass" is incompatible with protocol "_SupportsReplace"       "__replace__" is an incompatible type         Type "(val: int) -> ReplaceableClass" is not assignable to type "() -> ReplaceableClass"           Extra parameter "val" (reportArgumentType)
pyright: Run test cases (Linux, 3.13): stdlib/@tests/test_cases/check_copy.py#L20
Type of "cpy" is unknown (reportUnknownVariableType)
pyright: Run test cases (Windows, 3.14)
Exit code 1
mypy: Run test cases
Process completed with exit code 1.