You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I identified another problem that "blocks" the merge of astral-sh/ruff#18007 (in the sense that there are hundreds of false positives caused by this). It can be reproduced on main by explicitly annotating self: Self, and occurs when trying to initialize a generic class with a type parameter default value:
fromtypingimportSelfclassMyClass[T=int]:
def__init__(self: Self, x: T) ->None:
self.x=x# error: Argument to bound method `__init__` is incorrect: Argument type `MyClass[T@MyClass]` does not satisfy upper bound of type variable `Self`MyClass(1)