Summary
On astral-sh/ruff#18007, we see the following problem:
def f(obj: object):
if isinstance(obj, list):
obj.clear()
/home/shark/playground/test.py:8:9: error[invalid-argument-type] Argument to bound method `clear` is incorrect: Argument type `Top[list[Unknown]]` does not satisfy upper bound `Bottom[MutableSequence[Unknown]]` of type variable `Self`
/home/shark/playground/test.py:8:9: error[invalid-argument-type] Argument to bound method `clear` is incorrect: Expected `Self@clear`, found `Top[list[Unknown]]`
It looks like the upper bound is incorrect (Bottom[MutableSequence[Unknown]] instead of Top[MutableSequence[Unknown]].
Version
astral-sh/ruff#18007 (ed798a35ee8378d18c014a3c8c605981ca336ec9)