mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Only accept type[Self] in the object.__class__ setter (#13021)
This commit is contained in:
@@ -107,7 +107,7 @@ class object:
|
||||
@property
|
||||
def __class__(self) -> type[Self]: ...
|
||||
@__class__.setter
|
||||
def __class__(self, type: type[object], /) -> None: ...
|
||||
def __class__(self, type: type[Self], /) -> None: ...
|
||||
def __init__(self) -> None: ...
|
||||
def __new__(cls) -> Self: ...
|
||||
# N.B. `object.__setattr__` and `object.__delattr__` are heavily special-cased by type checkers.
|
||||
|
||||
Reference in New Issue
Block a user