fix Class3 example

This commit is contained in:
Douglas Creager 2025-12-15 12:07:32 -05:00
parent 26c847c229
commit 4e3dd58815
1 changed files with 3 additions and 2 deletions

View File

@ -792,10 +792,11 @@ class ClassWithNewAndInit:
def __new__(cls, *args, **kwargs) -> Self:
raise NotImplementedError
def __init__(self) -> None: ...
def __init__(self, x: int) -> None: ...
# revealed: ((...) -> ClassWithNewAndInit) | (() -> ClassWithNewAndInit)
# revealed: ((...) -> ClassWithNewAndInit) | ((x: int) -> ClassWithNewAndInit)
reveal_type(into_callable(ClassWithNewAndInit))
# TODO: revealed: ((...) -> ClassWithNewAndInit) | ((x: int) -> ClassWithNewAndInit)
# revealed: (...) -> ClassWithNewAndInit
reveal_type(accepts_callable(ClassWithNewAndInit))
# revealed: ClassWithNewAndInit