@zzzen/pyright-internal 1.2.0-dev.20230618 → 1.2.0-dev.20230625

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/analyzer/codeFlowEngine.js +28 -4
  2. package/dist/analyzer/codeFlowEngine.js.map +1 -1
  3. package/dist/analyzer/codeFlowUtils.js +2 -0
  4. package/dist/analyzer/codeFlowUtils.js.map +1 -1
  5. package/dist/analyzer/constraintSolver.js +15 -1
  6. package/dist/analyzer/constraintSolver.js.map +1 -1
  7. package/dist/analyzer/constructors.js +6 -2
  8. package/dist/analyzer/constructors.js.map +1 -1
  9. package/dist/analyzer/dataClasses.js +64 -0
  10. package/dist/analyzer/dataClasses.js.map +1 -1
  11. package/dist/analyzer/decorators.d.ts +7 -0
  12. package/dist/analyzer/decorators.js +438 -0
  13. package/dist/analyzer/decorators.js.map +1 -0
  14. package/dist/analyzer/operations.d.ts +1 -1
  15. package/dist/analyzer/operations.js +4 -4
  16. package/dist/analyzer/operations.js.map +1 -1
  17. package/dist/analyzer/parameterUtils.d.ts +2 -1
  18. package/dist/analyzer/parameterUtils.js +1 -0
  19. package/dist/analyzer/parameterUtils.js.map +1 -1
  20. package/dist/analyzer/protocols.js +2 -2
  21. package/dist/analyzer/protocols.js.map +1 -1
  22. package/dist/analyzer/typeEvaluator.js +191 -577
  23. package/dist/analyzer/typeEvaluator.js.map +1 -1
  24. package/dist/analyzer/typeEvaluatorTypes.d.ts +3 -2
  25. package/dist/analyzer/typeEvaluatorTypes.js +2 -2
  26. package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
  27. package/dist/analyzer/typeGuards.js +21 -18
  28. package/dist/analyzer/typeGuards.js.map +1 -1
  29. package/dist/analyzer/typePrinter.d.ts +2 -1
  30. package/dist/analyzer/typePrinter.js +27 -5
  31. package/dist/analyzer/typePrinter.js.map +1 -1
  32. package/dist/analyzer/typeUtils.d.ts +3 -1
  33. package/dist/analyzer/typeUtils.js +30 -10
  34. package/dist/analyzer/typeUtils.js.map +1 -1
  35. package/dist/analyzer/typedDicts.js +9 -11
  36. package/dist/analyzer/typedDicts.js.map +1 -1
  37. package/dist/analyzer/types.d.ts +5 -3
  38. package/dist/analyzer/types.js +49 -11
  39. package/dist/analyzer/types.js.map +1 -1
  40. package/dist/common/extensibility.d.ts +3 -3
  41. package/dist/common/extensibility.js.map +1 -1
  42. package/dist/languageService/hoverProvider.js +13 -9
  43. package/dist/languageService/hoverProvider.js.map +1 -1
  44. package/dist/localization/localize.d.ts +0 -4
  45. package/dist/localization/localize.js +0 -1
  46. package/dist/localization/localize.js.map +1 -1
  47. package/dist/localization/package.nls.en-us.json +0 -1
  48. package/dist/pyright.js +39 -2
  49. package/dist/pyright.js.map +1 -1
  50. package/dist/tests/checker.test.js +1 -1
  51. package/dist/tests/fourslash/completions.typeAlias.fourslash.js +1 -1
  52. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +1 -1
  53. package/dist/tests/fourslash/hover.docstring.alias.fourslash.js +3 -3
  54. package/dist/tests/fourslash/hover.init.fourslash.js +1 -1
  55. package/dist/tests/fourslash/hover.variable.docString.fourslash.js +1 -1
  56. package/dist/tests/positionUtils.test.js +10 -0
  57. package/dist/tests/positionUtils.test.js.map +1 -1
  58. package/dist/tests/tokenizer.test.js +12 -1
  59. package/dist/tests/tokenizer.test.js.map +1 -1
  60. package/dist/tests/typeEvaluator1.test.js +184 -136
  61. package/dist/tests/typeEvaluator1.test.js.map +1 -1
  62. package/dist/tests/typeEvaluator2.test.js +248 -330
  63. package/dist/tests/typeEvaluator2.test.js.map +1 -1
  64. package/dist/tests/typeEvaluator3.test.js +218 -177
  65. package/dist/tests/typeEvaluator3.test.js.map +1 -1
  66. package/dist/tests/typeEvaluator4.test.js +58 -46
  67. package/dist/tests/typeEvaluator4.test.js.map +1 -1
  68. package/dist/tests/typePrinter.test.js +2 -2
  69. package/package.json +1 -1
@@ -362,6 +362,30 @@ test('TypeNarrowingIsinstance12', () => {
362
362
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsinstance12.py']);
363
363
  TestUtils.validateResults(analysisResults, 0);
364
364
  });
365
+ test('TypeNarrowingIsinstance13.py', () => {
366
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsinstance13.py']);
367
+ TestUtils.validateResults(analysisResults, 0);
368
+ });
369
+ test('TypeNarrowingIsinstance14', () => {
370
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsinstance14.py']);
371
+ TestUtils.validateResults(analysisResults, 0);
372
+ });
373
+ test('TypeNarrowingIsinstance15', () => {
374
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsinstance15.py']);
375
+ TestUtils.validateResults(analysisResults, 0);
376
+ });
377
+ test('TypeNarrowingIsinstance16', () => {
378
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsinstance16.py']);
379
+ TestUtils.validateResults(analysisResults, 0);
380
+ });
381
+ test('TypeNarrowingIsinstance17', () => {
382
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsinstance17.py']);
383
+ TestUtils.validateResults(analysisResults, 0);
384
+ });
385
+ test('TypeNarrowingIsinstance18', () => {
386
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsinstance18.py']);
387
+ TestUtils.validateResults(analysisResults, 0);
388
+ });
365
389
  test('TypeNarrowingTupleLength1', () => {
366
390
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingTupleLength1.py']);
367
391
  TestUtils.validateResults(analysisResults, 0);
@@ -426,40 +450,40 @@ test('Specialization2', () => {
426
450
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['specialization2.py']);
427
451
  TestUtils.validateResults(analysisResults, 0);
428
452
  });
429
- test('Expressions1', () => {
430
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions1.py']);
453
+ test('Expression1', () => {
454
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression1.py']);
431
455
  TestUtils.validateResults(analysisResults, 4);
432
456
  });
433
- test('Expressions2', () => {
434
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions2.py']);
457
+ test('Expression2', () => {
458
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression2.py']);
435
459
  TestUtils.validateResults(analysisResults, 1);
436
460
  });
437
- test('Expressions3', () => {
438
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions3.py']);
461
+ test('Expression3', () => {
462
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression3.py']);
439
463
  TestUtils.validateResults(analysisResults, 0);
440
464
  });
441
- test('Expressions4', () => {
442
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions4.py']);
465
+ test('Expression4', () => {
466
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression4.py']);
443
467
  TestUtils.validateResults(analysisResults, 2);
444
468
  });
445
- test('Expressions5', () => {
446
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions5.py']);
469
+ test('Expression5', () => {
470
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression5.py']);
447
471
  TestUtils.validateResults(analysisResults, 12);
448
472
  });
449
- test('Expressions6', () => {
450
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions6.py']);
473
+ test('Expression6', () => {
474
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression6.py']);
451
475
  TestUtils.validateResults(analysisResults, 0);
452
476
  });
453
- test('Expressions7', () => {
454
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions7.py']);
477
+ test('Expression7', () => {
478
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression7.py']);
455
479
  TestUtils.validateResults(analysisResults, 0);
456
480
  });
457
- test('Expressions8', () => {
458
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions8.py']);
481
+ test('Expression8', () => {
482
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression8.py']);
459
483
  TestUtils.validateResults(analysisResults, 1);
460
484
  });
461
- test('Expressions9', () => {
462
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expressions9.py']);
485
+ test('Expression9', () => {
486
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['expression9.py']);
463
487
  TestUtils.validateResults(analysisResults, 0);
464
488
  });
465
489
  test('Unpack1', () => {
@@ -542,6 +566,10 @@ test('Lambda11', () => {
542
566
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['lambda11.py']);
543
567
  TestUtils.validateResults(analysisResults, 0);
544
568
  });
569
+ test('Lambda12', () => {
570
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['lambda12.py']);
571
+ TestUtils.validateResults(analysisResults, 0);
572
+ });
545
573
  test('Call1', () => {
546
574
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['call1.py']);
547
575
  TestUtils.validateResults(analysisResults, 6);
@@ -585,6 +613,10 @@ test('Call9', () => {
585
613
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['call9.py']);
586
614
  TestUtils.validateResults(analysisResults, 1);
587
615
  });
616
+ test('Call10', () => {
617
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['call10.py']);
618
+ TestUtils.validateResults(analysisResults, 3);
619
+ });
588
620
  test('Function1', () => {
589
621
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function1.py']);
590
622
  TestUtils.validateResults(analysisResults, 0);
@@ -595,11 +627,15 @@ test('Function2', () => {
595
627
  });
596
628
  test('Function3', () => {
597
629
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function3.py']);
598
- TestUtils.validateResults(analysisResults, 3);
630
+ TestUtils.validateResults(analysisResults, 1);
599
631
  });
600
632
  test('Function4', () => {
601
633
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function4.py']);
602
- TestUtils.validateResults(analysisResults, 1);
634
+ TestUtils.validateResults(analysisResults, 0);
635
+ });
636
+ test('Function5', () => {
637
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function5.py']);
638
+ TestUtils.validateResults(analysisResults, 0);
603
639
  });
604
640
  test('Function6', () => {
605
641
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function6.py']);
@@ -607,7 +643,7 @@ test('Function6', () => {
607
643
  });
608
644
  test('Function7', () => {
609
645
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function7.py']);
610
- TestUtils.validateResults(analysisResults, 0);
646
+ TestUtils.validateResults(analysisResults, 2);
611
647
  });
612
648
  test('Function8', () => {
613
649
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function8.py']);
@@ -615,20 +651,12 @@ test('Function8', () => {
615
651
  });
616
652
  test('Function9', () => {
617
653
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function9.py']);
618
- TestUtils.validateResults(analysisResults, 2);
654
+ TestUtils.validateResults(analysisResults, 0);
619
655
  });
620
656
  test('Function10', () => {
621
657
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function10.py']);
622
658
  TestUtils.validateResults(analysisResults, 0);
623
659
  });
624
- test('Function11', () => {
625
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function11.py']);
626
- TestUtils.validateResults(analysisResults, 0);
627
- });
628
- test('Function12', () => {
629
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['function12.py']);
630
- TestUtils.validateResults(analysisResults, 0);
631
- });
632
660
  test('KwargsUnpack1', () => {
633
661
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['kwargsUnpack1.py']);
634
662
  TestUtils.validateResults(analysisResults, 11);
@@ -665,7 +693,7 @@ test('Annotations4', () => {
665
693
  });
666
694
  test('Annotations5', () => {
667
695
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['annotations5.py']);
668
- TestUtils.validateResults(analysisResults, 0);
696
+ TestUtils.validateResults(analysisResults, 1);
669
697
  });
670
698
  test('Annotations6', () => {
671
699
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['annotations6.py']);
@@ -743,109 +771,113 @@ test('CapturedVariable1', () => {
743
771
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['capturedVariable1.py']);
744
772
  TestUtils.validateResults(analysisResults, 5);
745
773
  });
746
- test('Properties1', () => {
747
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties1.py']);
774
+ test('Property1', () => {
775
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property1.py']);
748
776
  TestUtils.validateResults(analysisResults, 5);
749
777
  });
750
- test('Properties2', () => {
751
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties2.py']);
778
+ test('Property2', () => {
779
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property2.py']);
752
780
  TestUtils.validateResults(analysisResults, 2);
753
781
  });
754
- test('Properties3', () => {
755
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties3.py']);
782
+ test('Property3', () => {
783
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property3.py']);
756
784
  TestUtils.validateResults(analysisResults, 4);
757
785
  });
758
- test('Properties4', () => {
759
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties4.py']);
786
+ test('Property4', () => {
787
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property4.py']);
760
788
  TestUtils.validateResults(analysisResults, 0);
761
789
  });
762
- test('Properties5', () => {
763
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties5.py']);
790
+ test('Property5', () => {
791
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property5.py']);
764
792
  TestUtils.validateResults(analysisResults, 0);
765
793
  });
766
- test('Properties6', () => {
794
+ test('Property6', () => {
767
795
  const configOptions = new configOptions_1.ConfigOptions('.');
768
796
  // Analyze with reportPropertyTypeMismatch enabled.
769
797
  configOptions.diagnosticRuleSet.reportPropertyTypeMismatch = 'error';
770
- const analysisResult1 = TestUtils.typeAnalyzeSampleFiles(['properties6.py'], configOptions);
798
+ const analysisResult1 = TestUtils.typeAnalyzeSampleFiles(['property6.py'], configOptions);
771
799
  TestUtils.validateResults(analysisResult1, 2);
772
800
  // Analyze with reportPropertyTypeMismatch disabled.
773
801
  configOptions.diagnosticRuleSet.reportPropertyTypeMismatch = 'none';
774
- const analysisResult2 = TestUtils.typeAnalyzeSampleFiles(['properties6.py'], configOptions);
802
+ const analysisResult2 = TestUtils.typeAnalyzeSampleFiles(['property6.py'], configOptions);
775
803
  TestUtils.validateResults(analysisResult2, 0);
776
804
  });
777
- test('Properties7', () => {
778
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties7.py']);
805
+ test('Property7', () => {
806
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property7.py']);
779
807
  TestUtils.validateResults(analysisResults, 2);
780
808
  });
781
- test('Properties8', () => {
782
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties8.py']);
809
+ test('Property8', () => {
810
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property8.py']);
783
811
  TestUtils.validateResults(analysisResults, 4);
784
812
  });
785
- test('Properties9', () => {
786
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties9.py']);
813
+ test('Property9', () => {
814
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property9.py']);
787
815
  TestUtils.validateResults(analysisResults, 0);
788
816
  });
789
- test('Properties10', () => {
790
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties10.py']);
817
+ test('Property10', () => {
818
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property10.py']);
791
819
  TestUtils.validateResults(analysisResults, 0);
792
820
  });
793
- test('Properties11', () => {
794
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties11.py']);
821
+ test('Property11', () => {
822
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property11.py']);
795
823
  TestUtils.validateResults(analysisResults, 1);
796
824
  });
797
- test('Properties12', () => {
798
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties12.py']);
825
+ test('Property12', () => {
826
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property12.py']);
799
827
  TestUtils.validateResults(analysisResults, 0);
800
828
  });
801
- test('Properties13', () => {
802
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties13.py']);
829
+ test('Property13', () => {
830
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property13.py']);
803
831
  TestUtils.validateResults(analysisResults, 0);
804
832
  });
805
- test('Properties14', () => {
806
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['properties14.py']);
833
+ test('Property14', () => {
834
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property14.py']);
807
835
  TestUtils.validateResults(analysisResults, 0);
808
836
  });
809
- test('Operators1', () => {
810
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators1.py']);
837
+ test('Property15', () => {
838
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['property15.py']);
839
+ TestUtils.validateResults(analysisResults, 0);
840
+ });
841
+ test('Operator1', () => {
842
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator1.py']);
811
843
  TestUtils.validateResults(analysisResults, 5);
812
844
  });
813
- test('Operators2', () => {
814
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators2.py']);
845
+ test('Operator2', () => {
846
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator2.py']);
815
847
  TestUtils.validateResults(analysisResults, 1);
816
848
  });
817
- test('Operators4', () => {
818
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators4.py']);
849
+ test('Operator3', () => {
850
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator3.py']);
819
851
  TestUtils.validateResults(analysisResults, 0);
820
852
  });
821
- test('Operators5', () => {
822
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators5.py']);
853
+ test('Operator4', () => {
854
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator4.py']);
855
+ TestUtils.validateResults(analysisResults, 0);
856
+ });
857
+ test('Operator5', () => {
858
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator5.py']);
823
859
  TestUtils.validateResults(analysisResults, 1);
824
860
  });
825
- test('Operators6', () => {
826
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators6.py']);
861
+ test('Operator6', () => {
862
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator6.py']);
827
863
  TestUtils.validateResults(analysisResults, 0);
828
864
  });
829
- test('Operators7', () => {
830
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators7.py']);
865
+ test('Operator7', () => {
866
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator7.py']);
831
867
  TestUtils.validateResults(analysisResults, 1);
832
868
  });
833
- test('Operators8', () => {
834
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators8.py']);
869
+ test('Operator8', () => {
870
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator8.py']);
835
871
  TestUtils.validateResults(analysisResults, 0);
836
872
  });
837
- test('Operators9', () => {
838
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators9.py']);
873
+ test('Operator9', () => {
874
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator9.py']);
839
875
  TestUtils.validateResults(analysisResults, 0);
840
876
  });
841
- test('Operators10', () => {
842
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators10.py']);
877
+ test('Operator10', () => {
878
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operator10.py']);
843
879
  TestUtils.validateResults(analysisResults, 1);
844
880
  });
845
- test('Operators11', () => {
846
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['operators11.py']);
847
- TestUtils.validateResults(analysisResults, 0);
848
- });
849
881
  test('Optional1', () => {
850
882
  const configOptions = new configOptions_1.ConfigOptions('.');
851
883
  // Disable diagnostics.
@@ -887,104 +919,104 @@ test('Optional2', () => {
887
919
  analysisResults = TestUtils.typeAnalyzeSampleFiles(['optional2.py'], configOptions);
888
920
  TestUtils.validateResults(analysisResults, 1);
889
921
  });
890
- test('Tuples1', () => {
891
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples1.py']);
922
+ test('Tuple1', () => {
923
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple1.py']);
892
924
  TestUtils.validateResults(analysisResults, 15);
893
925
  });
894
- test('Tuples2', () => {
895
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples2.py']);
926
+ test('Tuple2', () => {
927
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple2.py']);
896
928
  TestUtils.validateResults(analysisResults, 3);
897
929
  });
898
- test('Tuples3', () => {
899
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples3.py']);
930
+ test('Tuple3', () => {
931
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple3.py']);
900
932
  TestUtils.validateResults(analysisResults, 2);
901
933
  });
902
- test('Tuples4', () => {
903
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples4.py']);
934
+ test('Tuple4', () => {
935
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple4.py']);
904
936
  TestUtils.validateResults(analysisResults, 0);
905
937
  });
906
- test('Tuples5', () => {
907
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples5.py']);
938
+ test('Tuple5', () => {
939
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple5.py']);
908
940
  TestUtils.validateResults(analysisResults, 2);
909
941
  });
910
- test('Tuples6', () => {
911
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples6.py']);
942
+ test('Tuple6', () => {
943
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple6.py']);
912
944
  TestUtils.validateResults(analysisResults, 9);
913
945
  });
914
- test('Tuples7', () => {
915
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples7.py']);
946
+ test('Tuple7', () => {
947
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple7.py']);
916
948
  TestUtils.validateResults(analysisResults, 1);
917
949
  });
918
- test('Tuples8', () => {
919
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples8.py']);
950
+ test('Tuple8', () => {
951
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple8.py']);
920
952
  TestUtils.validateResults(analysisResults, 11);
921
953
  });
922
- test('Tuples9', () => {
923
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples9.py']);
954
+ test('Tuple9', () => {
955
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple9.py']);
924
956
  TestUtils.validateResults(analysisResults, 1);
925
957
  });
926
- test('Tuples10', () => {
927
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples10.py']);
958
+ test('Tuple10', () => {
959
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple10.py']);
928
960
  TestUtils.validateResults(analysisResults, 0);
929
961
  });
930
- test('Tuples11', () => {
931
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples11.py']);
962
+ test('Tuple11', () => {
963
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple11.py']);
932
964
  TestUtils.validateResults(analysisResults, 1);
933
965
  });
934
- test('Tuples12', () => {
935
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples12.py']);
966
+ test('Tuple12', () => {
967
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple12.py']);
936
968
  TestUtils.validateResults(analysisResults, 0);
937
969
  });
938
- test('Tuples13', () => {
939
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples13.py']);
970
+ test('Tuple13', () => {
971
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple13.py']);
940
972
  TestUtils.validateResults(analysisResults, 0);
941
973
  });
942
- test('Tuples15', () => {
943
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples15.py']);
974
+ test('Tuple15', () => {
975
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple15.py']);
944
976
  TestUtils.validateResults(analysisResults, 0);
945
977
  });
946
- test('Tuples16', () => {
947
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples16.py']);
978
+ test('Tuple16', () => {
979
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple16.py']);
948
980
  TestUtils.validateResults(analysisResults, 0);
949
981
  });
950
- test('Tuples17', () => {
951
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples17.py']);
982
+ test('Tuple17', () => {
983
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple17.py']);
952
984
  TestUtils.validateResults(analysisResults, 0);
953
985
  });
954
- test('Tuples18', () => {
955
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuples18.py']);
986
+ test('Tuple18', () => {
987
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['tuple18.py']);
956
988
  TestUtils.validateResults(analysisResults, 0);
957
989
  });
958
- test('NamedTuples1', () => {
959
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples1.py']);
990
+ test('NamedTuple1', () => {
991
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple1.py']);
960
992
  TestUtils.validateResults(analysisResults, 12);
961
993
  });
962
- test('NamedTuples2', () => {
963
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples2.py']);
994
+ test('NamedTuple2', () => {
995
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple2.py']);
964
996
  TestUtils.validateResults(analysisResults, 8);
965
997
  });
966
- test('NamedTuples3', () => {
967
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples3.py']);
998
+ test('NamedTuple3', () => {
999
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple3.py']);
968
1000
  TestUtils.validateResults(analysisResults, 1);
969
1001
  });
970
- test('NamedTuples4', () => {
971
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples4.py']);
1002
+ test('NamedTuple4', () => {
1003
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple4.py']);
972
1004
  TestUtils.validateResults(analysisResults, 0);
973
1005
  });
974
- test('NamedTuples5', () => {
975
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples5.py']);
1006
+ test('NamedTuple5', () => {
1007
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple5.py']);
976
1008
  TestUtils.validateResults(analysisResults, 0);
977
1009
  });
978
- test('NamedTuples6', () => {
979
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples6.py']);
1010
+ test('NamedTuple6', () => {
1011
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple6.py']);
980
1012
  TestUtils.validateResults(analysisResults, 3);
981
1013
  });
982
- test('NamedTuples7', () => {
983
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples7.py']);
1014
+ test('NamedTuple7', () => {
1015
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple7.py']);
984
1016
  TestUtils.validateResults(analysisResults, 1);
985
1017
  });
986
- test('NamedTuples8', () => {
987
- const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuples8.py']);
1018
+ test('NamedTuple8', () => {
1019
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['namedTuple8.py']);
988
1020
  TestUtils.validateResults(analysisResults, 0);
989
1021
  });
990
1022
  test('Slots1', () => {
@@ -1100,6 +1132,14 @@ test('PseudoGeneric1', () => {
1100
1132
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['pseudoGeneric1.py']);
1101
1133
  TestUtils.validateResults(analysisResults, 0);
1102
1134
  });
1135
+ test('PseudoGeneric2', () => {
1136
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['pseudoGeneric2.py']);
1137
+ TestUtils.validateResults(analysisResults, 1);
1138
+ });
1139
+ test('PseudoGeneric3', () => {
1140
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['pseudoGeneric3.py']);
1141
+ TestUtils.validateResults(analysisResults, 0);
1142
+ });
1103
1143
  test('LiteralString1', () => {
1104
1144
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['literalString1.py']);
1105
1145
  TestUtils.validateResults(analysisResults, 8);
@@ -1116,6 +1156,10 @@ test('ParamInference1', () => {
1116
1156
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['paramInference1.py']);
1117
1157
  TestUtils.validateResults(analysisResults, 0);
1118
1158
  });
1159
+ test('ParamInference2', () => {
1160
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['paramInference2.py']);
1161
+ TestUtils.validateResults(analysisResults, 0);
1162
+ });
1119
1163
  test('Dictionary1', () => {
1120
1164
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['dictionary1.py']);
1121
1165
  TestUtils.validateResults(analysisResults, 3);
@@ -1132,22 +1176,26 @@ test('Dictionary4', () => {
1132
1176
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['dictionary4.py']);
1133
1177
  TestUtils.validateResults(analysisResults, 0);
1134
1178
  });
1135
- test('StaticExpressions1', () => {
1179
+ test('StaticExpression1', () => {
1136
1180
  const configOptions = new configOptions_1.ConfigOptions('.');
1137
1181
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_8;
1138
1182
  configOptions.defaultPythonPlatform = 'windows';
1139
- const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['staticExpressions1.py'], configOptions);
1183
+ const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['staticExpression1.py'], configOptions);
1140
1184
  TestUtils.validateResults(analysisResults1, 9);
1141
1185
  configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
1142
1186
  configOptions.defaultPythonPlatform = 'Linux';
1143
- const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['staticExpressions1.py'], configOptions);
1187
+ const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['staticExpression1.py'], configOptions);
1144
1188
  TestUtils.validateResults(analysisResults2, 6);
1145
1189
  configOptions.defineConstant.set('DEFINED_TRUE', true);
1146
1190
  configOptions.defineConstant.set('DEFINED_FALSE', false);
1147
1191
  configOptions.defineConstant.set('DEFINED_STR', 'hi!');
1148
- const analysisResults3 = TestUtils.typeAnalyzeSampleFiles(['staticExpressions1.py'], configOptions);
1192
+ const analysisResults3 = TestUtils.typeAnalyzeSampleFiles(['staticExpression1.py'], configOptions);
1149
1193
  TestUtils.validateResults(analysisResults3, 0);
1150
1194
  });
1195
+ test('StaticExpression2', () => {
1196
+ const analysisResults = TestUtils.typeAnalyzeSampleFiles(['staticExpression2.py']);
1197
+ TestUtils.validateResults(analysisResults, 0);
1198
+ });
1151
1199
  test('SpecialForm1', () => {
1152
1200
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['specialForm1.py']);
1153
1201
  TestUtils.validateResults(analysisResults, 4);