Recognise the @object.__new__
decorator on a class definition
#12265
Labels
@object.__new__
decorator on a class definition
#12265
Bug Report
For the following code:
mypy
returns:If you
print
instead ofreveal_type
it shows that:Following screenshot shows that ``pyright` does recognise this.
Expected Behavior
Recognise that the
@object.__new__
decorator turnsA
into an instance ofA
and set that as its type.Actual Behavior
A
is now inferred asType[A]
.Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: