@@ -1386,24 +1386,6 @@ class F:
1386
1386
@t.coroutine
1387
1387
def g() -> Untyped: ...
1388
1388
1389
- [case testCoroutineSpecialCase_import]
1390
- import asyncio
1391
-
1392
- __all__ = ['C']
1393
-
1394
- @asyncio.coroutine
1395
- def f():
1396
- pass
1397
-
1398
- class C:
1399
- def f(self):
1400
- pass
1401
- [out]
1402
- import asyncio
1403
-
1404
- class C:
1405
- def f(self): ...
1406
-
1407
1389
-- Tests for stub generation from semantically analyzed trees.
1408
1390
-- These tests are much slower, so use the `_semanal` suffix only when needed.
1409
1391
@@ -2668,3 +2650,34 @@ def f():
2668
2650
from basedtyping import Untyped
2669
2651
2670
2652
def f() -> Untyped: ...
2653
+
2654
+
2655
+ [case testKnownMagicMethodsReturnTypes]
2656
+ class Some:
2657
+ def __len__(self): ...
2658
+ def __length_hint__(self): ...
2659
+ def __init__(self): ...
2660
+ def __del__(self): ...
2661
+ def __bool__(self): ...
2662
+ def __bytes__(self): ...
2663
+ def __format__(self, spec): ...
2664
+ def __contains__(self, obj): ...
2665
+ def __complex__(self): ...
2666
+ def __int__(self): ...
2667
+ def __float__(self): ...
2668
+ def __index__(self): ...
2669
+ [out]
2670
+ class Some:
2671
+ def __len__(self) -> int: ...
2672
+ def __length_hint__(self) -> int: ...
2673
+ def __init__(self): ...
2674
+ def __del__(self): ...
2675
+ def __bool__(self) -> bool: ...
2676
+ def __bytes__(self) -> bytes: ...
2677
+ def __format__(self, spec) -> str: ...
2678
+ def __contains__(self, obj) -> bool: ...
2679
+ def __complex__(self) -> complex: ...
2680
+ def __int__(self) -> int: ...
2681
+ def __float__(self) -> float: ...
2682
+ def __index__(self) -> int: ...
2683
+
0 commit comments