[ty] Check method definitions on subclasses for Liskov violations by AlexWaygood · Pull Request #21436 · astral-sh/ruff (original) (raw)

@AlexWaygood added the ty

Multi-file analysis & type inference

label

Nov 13, 2025

dcreager added a commit that referenced this pull request

Nov 19, 2025

@dcreager

We're seeing flaky test failures on macos, which seems to be caused by different Salsa ID orderings on the different platforms. Constraint set BDDs order their internal nodes based on the Salsa IDs of the interned typevar structs, and we had some code that depended on variable ordering in an unexpected way.

This patch definitely fixes the macos test failure on #21414, and hopefully fixes it on #21436, too.

@AlexWaygood

@AlexWaygood

@AlexWaygood

@AlexWaygood @carljm

Co-authored-by: Carl Meyer carl@astral.sh

@AlexWaygood

@AlexWaygood

@AlexWaygood

dcreager added a commit that referenced this pull request

Nov 24, 2025

@dcreager

dcreager added a commit that referenced this pull request

Nov 24, 2025

@dcreager

…d-typevar

AlexWaygood added a commit that referenced this pull request

Nov 24, 2025

@AlexWaygood

#21598)

Summary

Building on #21436.

There's nothing conceptually more complicated about this, it just requires its own set of tests and its own subdiagnostic hint.

I also uncovered another inconsistency between mypy/pyright/pyrefly, which is fun. In this case, I suggest we go with pyright's behaviour.

Test Plan

mdtests/snapshots

KotlinIsland pushed a commit to KotlinIsland/basedpython that referenced this pull request

May 1, 2026

@AlexWaygood

…s (#21598)

Summary

Building on astral-sh/ruff#21436.

There's nothing conceptually more complicated about this, it just requires its own set of tests and its own subdiagnostic hint.

I also uncovered another inconsistency between mypy/pyright/pyrefly, which is fun. In this case, I suggest we go with pyright's behaviour.

Test Plan

mdtests/snapshots

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})