Repository navigation
Conversation
Typing conformance results regressed ❌The percentage of diagnostics emitted that were expected errors decreased from 98.24% to 97.98%. The percentage of expected errors that received a diagnostic held steady at 98.24%. The number of fully passing files regressed from 134/146 to 133/146. SummaryHow are test cases classified?Each test case represents one expected error annotation or a group of annotations sharing a tag. Counts are per test case, not per diagnostic — multiple diagnostics on the same line count as one. Required annotations (
Test file breakdown2 files altered
False positives added (3)3 diagnostics
|
Memory usage reportSummary
Significant changesClick to expand detailed breakdownflake8
trio
sphinx
prefect
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-argument-type |
17 | 0 | 0 |
dynamic-function-decorator-return |
0 | 4 | 0 |
type-assertion-failure |
0 | 3 | 0 |
invalid-return-type |
0 | 1 | 0 |
| Total | 17 | 8 | 0 |
Large timing changes:
| Project | Old Time | New Time | Change |
|---|---|---|---|
pytest-autoprofile |
0.16s | 19.39s | +12199% |
Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.
Raw diff (25 changes)
antidote (https://github.com/Finistere/antidote)
+ src/antidote/lib/interface_ext/_interface.py:540:36 error[invalid-argument-type] Argument to bound method `list.append` is incorrect: Expected `Weight@__register_implementation`, found `(Predicate[NeutralWeight] & Top[ImplementationWeight] & ~Predicate[Top[ImplementationWeight]]) | (Weight@__register_implementation & ~Predicate[Top[ImplementationWeight]] & ~NeutralWeight)`
psycopg (https://github.com/psycopg/psycopg)
- psycopg/psycopg/rows.py:137:16 error[invalid-return-type] Return type does not match returned value: expected `RowMaker[tuple[object, ...] & NamedTupleLike]`, found `(iterable: Iterable[Any]) -> Self@_make`
pyochain (https://github.com/OutSquareCapital/pyochain)
- tests/test_extern/test_cpython/test_abc/test_collection.py:60:1 error[dynamic-function-decorator-return] Decorator returns `Unknown`
- tests/test_extern/test_cpython/test_abc/test_iterator.py:34:1 error[dynamic-function-decorator-return] Decorator returns `Unknown`
- tests/test_extern/test_cpython/test_abc/test_reversible.py:56:1 error[dynamic-function-decorator-return] Decorator returns `Unknown`
- benchmarks/test_sequences.py:77:1 error[dynamic-function-decorator-return] Decorator returns `Unknown`
- tests/test_typing/check_iter.py:54:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `PyoIterator[PyoIterator[list[int]]]`
- tests/test_typing/check_iter.py:55:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `PyoIterator[list[int]]`
- tests/test_typing/check_iter.py:56:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `PyoIterator[int]`
sympy (https://github.com/sympy/sympy)
+ sympy/polys/matrices/tests/test_dense.py:28:14 error[invalid-argument-type] Argument to function `ddm_iadd` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:28:17 error[invalid-argument-type] Argument to function `ddm_iadd` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:35:14 error[invalid-argument-type] Argument to function `ddm_isub` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:35:17 error[invalid-argument-type] Argument to function `ddm_isub` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:41:14 error[invalid-argument-type] Argument to function `ddm_ineg` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:47:14 error[invalid-argument-type] Argument to function `ddm_imul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:51:14 error[invalid-argument-type] Argument to function `ddm_imul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:60:17 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:60:21 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:60:24 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:64:17 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:64:21 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:64:24 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:69:17 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:69:21 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
+ sympy/polys/matrices/tests/test_dense.py:69:24 error[invalid-argument-type] Argument to function `ddm_imatmul` is incorrect: Argument type `int` does not satisfy upper bound `RingElement` of type variable `R`
Merging this PR will regress 5 benchmarks
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
4450640 to
ba5535c
Compare
00540aa to
5986a53
Compare
5986a53 to
de466ee
Compare
d4e9ea7 to
d147101
Compare
| info: type `Concrete[T@diagnose]` is not assignable to protocol `Outer[int]` | ||
| info: └── protocol member `expose` is incompatible | ||
| info: └── incompatible return types: `Concrete[T@diagnose]` is not assignable to `Chain[int]` | ||
| info: └── type `Concrete[T@diagnose]` is not assignable to protocol `Chain[int]` | ||
| info: └── protocol member `child` is incompatible | ||
| info: └── incompatible return types: `Concrete[str]` is not assignable to `Chain[int]` | ||
| info: └── type `Concrete[str]` is not assignable to protocol `Chain[int]` | ||
| info: └── protocol member `value` is incompatible | ||
| info: └── incompatible return types: `str` is not assignable to `int` |
There was a problem hiding this comment.
We switch from reporting child to expose. This is a known limitation of error context trees for protocols: we can only report one incompatible member right now.
Summary
Protocol methods can restrict which receivers they accept, and classmethods can use
Selfto describe the instance type associated with their receiver. Binding these methods before their receiver is known loses information needed for compatibility checks and member lookup.Retain complete method signatures and bind each overload to the receivers permitted by the protocol. Resolve
Selfusing the actual class-object receiver during member lookup, and materialize types after binding. Stored bound methods retain their captured receivers.This accepts implementations with matching receiver restrictions and preserves intersection types when binding
Selfin protocol classmethods.Depends on #28822, which separates protocol declarations from instance and class access.
Fixes astral-sh/ty#4544.
Fixes astral-sh/ty#4075.
Validation
The conformance comparison still has three additional false positives in
protocols_generic.pyandprotocols_self.py, including with python/typing#2363 (8f9607ec). Passing files decrease from 131/146 to 130/146. These compatibility failures involving type variables in receiver annotations remain unresolved.