@@ -2750,7 +2750,6 @@ reveal_type(func(1)) # N: Revealed type is "builtins.int"
2750
2750
[builtins fixtures/tuple.pyi]
2751
2751
2752
2752
[case testGenericLambdaGenericMethodNoCrash]
2753
- # flags: --new-type-inference
2754
2753
from typing import TypeVar, Union, Callable, Generic
2755
2754
2756
2755
S = TypeVar("S")
@@ -2789,7 +2788,6 @@ reveal_type(dict2) # N: Revealed type is "builtins.dict[Any, __main__.B]"
2789
2788
-- ------------------------------------------------------------------
2790
2789
2791
2790
[case testInferenceAgainstGenericCallable]
2792
- # flags: --new-type-inference
2793
2791
from typing import TypeVar, Callable, List
2794
2792
2795
2793
X = TypeVar('X')
@@ -2807,7 +2805,6 @@ reveal_type(bar(id)) # N: Revealed type is "builtins.list[builtins.int]"
2807
2805
[builtins fixtures/list.pyi]
2808
2806
2809
2807
[case testInferenceAgainstGenericCallableNoLeak]
2810
- # flags: --new-type-inference
2811
2808
from typing import TypeVar, Callable
2812
2809
2813
2810
T = TypeVar('T')
@@ -2823,7 +2820,6 @@ reveal_type(f(tpl)) # N: Revealed type is "Any"
2823
2820
[out]
2824
2821
2825
2822
[case testInferenceAgainstGenericCallableChain]
2826
- # flags: --new-type-inference
2827
2823
from typing import TypeVar, Callable, List
2828
2824
2829
2825
X = TypeVar('X')
@@ -2836,7 +2832,6 @@ reveal_type(chain(id, id)) # N: Revealed type is "def (builtins.int) -> builtin
2836
2832
[builtins fixtures/list.pyi]
2837
2833
2838
2834
[case testInferenceAgainstGenericCallableGeneric]
2839
- # flags: --new-type-inference
2840
2835
from typing import TypeVar, Callable, List
2841
2836
2842
2837
S = TypeVar('S')
@@ -2857,7 +2852,6 @@ reveal_type(same(42)) # N: Revealed type is "builtins.list[builtins.int]"
2857
2852
[builtins fixtures/list.pyi]
2858
2853
2859
2854
[case testInferenceAgainstGenericCallableGenericReverse]
2860
- # flags: --new-type-inference
2861
2855
from typing import TypeVar, Callable, List
2862
2856
2863
2857
S = TypeVar('S')
@@ -2878,7 +2872,6 @@ reveal_type(same([42])) # N: Revealed type is "builtins.int"
2878
2872
[builtins fixtures/list.pyi]
2879
2873
2880
2874
[case testInferenceAgainstGenericCallableGenericArg]
2881
- # flags: --new-type-inference
2882
2875
from typing import TypeVar, Callable, List
2883
2876
2884
2877
S = TypeVar('S')
@@ -2899,7 +2892,6 @@ reveal_type(single(42)) # N: Revealed type is "builtins.list[builtins.int]"
2899
2892
[builtins fixtures/list.pyi]
2900
2893
2901
2894
[case testInferenceAgainstGenericCallableGenericChain]
2902
- # flags: --new-type-inference
2903
2895
from typing import TypeVar, Callable, List
2904
2896
2905
2897
S = TypeVar('S')
@@ -2913,7 +2905,6 @@ reveal_type(comb(id, id)) # N: Revealed type is "def [T] (T`1) -> T`1"
2913
2905
[builtins fixtures/list.pyi]
2914
2906
2915
2907
[case testInferenceAgainstGenericCallableGenericNonLinear]
2916
- # flags: --new-type-inference
2917
2908
from typing import TypeVar, Callable, List
2918
2909
2919
2910
S = TypeVar('S')
@@ -2934,7 +2925,6 @@ reveal_type(mix([id, id, id])) # N: Revealed type is "def [S] (S`4) -> builtins
2934
2925
[builtins fixtures/list.pyi]
2935
2926
2936
2927
[case testInferenceAgainstGenericCurry]
2937
- # flags: --new-type-inference
2938
2928
from typing import Callable, List, TypeVar
2939
2929
2940
2930
S = TypeVar("S")
@@ -2953,7 +2943,6 @@ reveal_type(dec2(test2)) # N: Revealed type is "def [T] (T`3) -> def (T`3) -> T
2953
2943
[builtins fixtures/list.pyi]
2954
2944
2955
2945
[case testInferenceAgainstGenericCallableNewVariable]
2956
- # flags: --new-type-inference
2957
2946
from typing import TypeVar, Callable, List
2958
2947
2959
2948
S = TypeVar('S')
@@ -2968,7 +2957,6 @@ reveal_type(dec(test)) # N: Revealed type is "def [U] (builtins.list[U`-1]) ->
2968
2957
[builtins fixtures/list.pyi]
2969
2958
2970
2959
[case testInferenceAgainstGenericCallableGenericAlias]
2971
- # flags: --new-type-inference
2972
2960
from typing import TypeVar, Callable, List
2973
2961
2974
2962
S = TypeVar('S')
@@ -2986,7 +2974,6 @@ reveal_type(dec(id)) # N: Revealed type is "def [S] (S`1) -> builtins.list[S`1]
2986
2974
[builtins fixtures/list.pyi]
2987
2975
2988
2976
[case testInferenceAgainstGenericCallableGenericProtocol]
2989
- # flags: --new-type-inference
2990
2977
from typing import TypeVar, Protocol, Generic, Optional
2991
2978
2992
2979
T = TypeVar('T')
@@ -3002,7 +2989,6 @@ reveal_type(lift(g)) # N: Revealed type is "def [T] (Union[T`1, None]) -> Union
3002
2989
[builtins fixtures/list.pyi]
3003
2990
3004
2991
[case testInferenceAgainstGenericSplitOrder]
3005
- # flags: --new-type-inference
3006
2992
from typing import TypeVar, Callable, List
3007
2993
3008
2994
S = TypeVar('S')
@@ -3017,7 +3003,6 @@ reveal_type(dec(id, id)) # N: Revealed type is "def (builtins.int) -> builtins.
3017
3003
[builtins fixtures/list.pyi]
3018
3004
3019
3005
[case testInferenceAgainstGenericSplitOrderGeneric]
3020
- # flags: --new-type-inference
3021
3006
from typing import TypeVar, Callable, Tuple
3022
3007
3023
3008
S = TypeVar('S')
@@ -3048,7 +3033,6 @@ reveal_type(id) # N: Revealed type is "def (builtins.int) -> builtins.int"
3048
3033
[builtins fixtures/tuple.pyi]
3049
3034
3050
3035
[case testInferenceAgainstGenericEllipsisSelfSpecialCase]
3051
- # flags: --new-type-inference
3052
3036
from typing import Self, Callable, TypeVar
3053
3037
3054
3038
T = TypeVar("T")
@@ -3062,7 +3046,6 @@ c: C
3062
3046
reveal_type(c.test()) # N: Revealed type is "__main__.C"
3063
3047
3064
3048
[case testInferenceAgainstGenericBoundsAndValues]
3065
- # flags: --new-type-inference
3066
3049
from typing import TypeVar, Callable, List
3067
3050
3068
3051
class B: ...
@@ -3090,7 +3073,6 @@ reveal_type(dec2(id2)) # N: Revealed type is "def (Never) -> builtins.list[Neve
3090
3073
# E: Argument 1 to "dec2" has incompatible type "Callable[[V], V]"; expected "Callable[[Never], Never]"
3091
3074
3092
3075
[case testInferenceAgainstGenericLambdas]
3093
- # flags: --new-type-inference
3094
3076
from typing import TypeVar, Callable, List
3095
3077
3096
3078
S = TypeVar('S')
@@ -3127,7 +3109,6 @@ dec4_bound(lambda x: x) # E: Value of type variable "I" of "dec4_bound" cannot
3127
3109
[builtins fixtures/list.pyi]
3128
3110
3129
3111
[case testInferenceAgainstGenericParamSpecBasicInList]
3130
- # flags: --new-type-inference
3131
3112
from typing import TypeVar, Callable, List, Tuple
3132
3113
from typing_extensions import ParamSpec
3133
3114
@@ -3146,7 +3127,6 @@ reveal_type(dec(pair)) # N: Revealed type is "def [U, V] (x: U`-1, y: V`-2) ->
3146
3127
[builtins fixtures/list.pyi]
3147
3128
3148
3129
[case testInferenceAgainstGenericParamSpecBasicDeList]
3149
- # flags: --new-type-inference
3150
3130
from typing import TypeVar, Callable, List, Tuple
3151
3131
from typing_extensions import ParamSpec
3152
3132
@@ -3163,7 +3143,6 @@ reveal_type(dec(either)) # N: Revealed type is "def [T] (x: builtins.list[T`5],
3163
3143
[builtins fixtures/list.pyi]
3164
3144
3165
3145
[case testInferenceAgainstGenericParamSpecPopOff]
3166
- # flags: --new-type-inference
3167
3146
from typing import TypeVar, Callable, List, Tuple
3168
3147
from typing_extensions import ParamSpec, Concatenate
3169
3148
@@ -3184,7 +3163,6 @@ reveal_type(dec(dec)) # N: Revealed type is "def () -> def [T, P, S] (def (T`-1
3184
3163
[builtins fixtures/list.pyi]
3185
3164
3186
3165
[case testInferenceAgainstGenericParamSpecPopOn]
3187
- # flags: --new-type-inference
3188
3166
from typing import TypeVar, Callable, List, Tuple
3189
3167
from typing_extensions import ParamSpec, Concatenate
3190
3168
@@ -3206,7 +3184,6 @@ reveal_type(dec(dec)) # N: Revealed type is "def [T, S] (T`13, f: def () -> def
3206
3184
[builtins fixtures/list.pyi]
3207
3185
3208
3186
[case testInferenceAgainstGenericParamSpecVsParamSpec]
3209
- # flags: --new-type-inference
3210
3187
from typing import TypeVar, Callable, List, Tuple, Generic
3211
3188
from typing_extensions import ParamSpec, Concatenate
3212
3189
@@ -3227,7 +3204,6 @@ reveal_type(dec(h)) # N: Revealed type is "def [T, Q] (T`-1, *Q.args, **Q.kwarg
3227
3204
[builtins fixtures/list.pyi]
3228
3205
3229
3206
[case testInferenceAgainstGenericParamSpecVsParamSpecConcatenate]
3230
- # flags: --new-type-inference
3231
3207
from typing import TypeVar, Callable, List, Tuple, Generic
3232
3208
from typing_extensions import ParamSpec, Concatenate
3233
3209
@@ -3245,7 +3221,6 @@ reveal_type(dec(h)) # N: Revealed type is "def [T, Q] (T`-1, *Q.args, **Q.kwarg
3245
3221
[builtins fixtures/list.pyi]
3246
3222
3247
3223
[case testInferenceAgainstGenericParamSpecSecondary]
3248
- # flags: --new-type-inference
3249
3224
from typing import TypeVar, Callable, List, Tuple, Generic
3250
3225
from typing_extensions import ParamSpec, Concatenate
3251
3226
@@ -3263,7 +3238,6 @@ reveal_type(dec(g)) # N: Revealed type is "def (builtins.int) -> __main__.Foo[[
3263
3238
[builtins fixtures/list.pyi]
3264
3239
3265
3240
[case testInferenceAgainstGenericParamSpecSecondOrder]
3266
- # flags: --new-type-inference
3267
3241
from typing import TypeVar, Callable
3268
3242
from typing_extensions import ParamSpec, Concatenate
3269
3243
@@ -3285,7 +3259,6 @@ reveal_type(transform(dec2)) # N: Revealed type is "def [W, T] (def (builtins.i
3285
3259
[builtins fixtures/tuple.pyi]
3286
3260
3287
3261
[case testNoAccidentalVariableClashInNestedGeneric]
3288
- # flags: --new-type-inference
3289
3262
from typing import TypeVar, Callable, Generic, Tuple
3290
3263
3291
3264
T = TypeVar('T')
@@ -3302,7 +3275,6 @@ def apply(a: S, b: T) -> None:
3302
3275
[builtins fixtures/tuple.pyi]
3303
3276
3304
3277
[case testInferenceAgainstGenericParamSpecSpuriousBoundsNotUsed]
3305
- # flags: --new-type-inference
3306
3278
from typing import TypeVar, Callable, Generic
3307
3279
from typing_extensions import ParamSpec, Concatenate
3308
3280
@@ -3321,7 +3293,6 @@ reveal_type(test) # N: Revealed type is "def () -> def [Q] (__main__.Foo[Q`-1])
3321
3293
[builtins fixtures/tuple.pyi]
3322
3294
3323
3295
[case testInferenceAgainstGenericVariadicBasicInList]
3324
- # flags: --new-type-inference
3325
3296
from typing import Tuple, TypeVar, List, Callable
3326
3297
from typing_extensions import Unpack, TypeVarTuple
3327
3298
@@ -3341,7 +3312,6 @@ reveal_type(dec(pair)) # N: Revealed type is "def [U, V] (U`-1, V`-2) -> builti
3341
3312
[builtins fixtures/tuple.pyi]
3342
3313
3343
3314
[case testInferenceAgainstGenericVariadicBasicDeList]
3344
- # flags: --new-type-inference
3345
3315
from typing import Tuple, TypeVar, List, Callable
3346
3316
from typing_extensions import Unpack, TypeVarTuple
3347
3317
@@ -3359,7 +3329,6 @@ reveal_type(dec(either)) # N: Revealed type is "def [T] (builtins.list[T`5], bu
3359
3329
[builtins fixtures/tuple.pyi]
3360
3330
3361
3331
[case testInferenceAgainstGenericVariadicPopOff]
3362
- # flags: --new-type-inference
3363
3332
from typing import TypeVar, Callable, List, Tuple
3364
3333
from typing_extensions import Unpack, TypeVarTuple
3365
3334
@@ -3381,7 +3350,6 @@ reveal_type(dec(dec)) # N: Revealed type is "def () -> def [T, Ts, S] (def (T`-
3381
3350
[builtins fixtures/list.pyi]
3382
3351
3383
3352
[case testInferenceAgainstGenericVariadicPopOn]
3384
- # flags: --new-type-inference
3385
3353
from typing import TypeVar, Callable, List, Tuple
3386
3354
from typing_extensions import Unpack, TypeVarTuple
3387
3355
@@ -3404,7 +3372,6 @@ reveal_type(dec(dec)) # N: Revealed type is "def [T, S] (T`13, def () -> def (T
3404
3372
[builtins fixtures/list.pyi]
3405
3373
3406
3374
[case testInferenceAgainstGenericVariadicVsVariadic]
3407
- # flags: --new-type-inference
3408
3375
from typing import TypeVar, Callable, List, Generic
3409
3376
from typing_extensions import Unpack, TypeVarTuple
3410
3377
@@ -3424,7 +3391,6 @@ reveal_type(dec(g)) # N: Revealed type is "def [Ts] (*Unpack[Ts`4]) -> builtins
3424
3391
[builtins fixtures/list.pyi]
3425
3392
3426
3393
[case testInferenceAgainstGenericVariadicVsVariadicConcatenate]
3427
- # flags: --new-type-inference
3428
3394
from typing import TypeVar, Callable, Generic
3429
3395
from typing_extensions import Unpack, TypeVarTuple
3430
3396
@@ -3443,7 +3409,6 @@ reveal_type(dec(h)) # N: Revealed type is "def [T, Us] (T`-1, *Unpack[Us`-2]) -
3443
3409
[builtins fixtures/list.pyi]
3444
3410
3445
3411
[case testInferenceAgainstGenericVariadicSecondary]
3446
- # flags: --new-type-inference
3447
3412
from typing import TypeVar, Callable, Generic
3448
3413
from typing_extensions import Unpack, TypeVarTuple
3449
3414
0 commit comments