mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-03 00:13:46 +08:00
Only accept type[Self] in the object.__class__ setter (#13021)
This commit is contained in:
1 parent
b2c964fdea
commit
480b1ac2e6
1 file changed
+1
-1
+1
-1
@@ -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