@zzzen/pyright-internal 1.2.0-dev.20240310 → 1.2.0-dev.20240324

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 (116) hide show
  1. package/dist/analyzer/analyzerFileInfo.js +1 -1
  2. package/dist/analyzer/analyzerFileInfo.js.map +1 -1
  3. package/dist/analyzer/checker.d.ts +1 -0
  4. package/dist/analyzer/checker.js +44 -51
  5. package/dist/analyzer/checker.js.map +1 -1
  6. package/dist/analyzer/deprecatedSymbols.js +40 -40
  7. package/dist/analyzer/deprecatedSymbols.js.map +1 -1
  8. package/dist/analyzer/importResolver.js +6 -6
  9. package/dist/analyzer/importResolver.js.map +1 -1
  10. package/dist/analyzer/operations.js +9 -9
  11. package/dist/analyzer/operations.js.map +1 -1
  12. package/dist/analyzer/parseTreeUtils.js +1 -1
  13. package/dist/analyzer/parseTreeUtils.js.map +1 -1
  14. package/dist/analyzer/patternMatching.js +16 -12
  15. package/dist/analyzer/patternMatching.js.map +1 -1
  16. package/dist/analyzer/properties.js +2 -8
  17. package/dist/analyzer/properties.js.map +1 -1
  18. package/dist/analyzer/pythonPathUtils.js +1 -2
  19. package/dist/analyzer/pythonPathUtils.js.map +1 -1
  20. package/dist/analyzer/service.js +1 -1
  21. package/dist/analyzer/service.js.map +1 -1
  22. package/dist/analyzer/staticExpressions.js +52 -30
  23. package/dist/analyzer/staticExpressions.js.map +1 -1
  24. package/dist/analyzer/typeEvaluator.js +216 -105
  25. package/dist/analyzer/typeEvaluator.js.map +1 -1
  26. package/dist/analyzer/typeEvaluatorTypes.d.ts +6 -1
  27. package/dist/analyzer/typeGuards.js +8 -11
  28. package/dist/analyzer/typeGuards.js.map +1 -1
  29. package/dist/analyzer/typeUtils.d.ts +1 -1
  30. package/dist/analyzer/typeUtils.js +34 -15
  31. package/dist/analyzer/typeUtils.js.map +1 -1
  32. package/dist/analyzer/types.d.ts +2 -1
  33. package/dist/analyzer/types.js +1 -0
  34. package/dist/analyzer/types.js.map +1 -1
  35. package/dist/backgroundThreadBase.d.ts +4 -1
  36. package/dist/backgroundThreadBase.js +21 -1
  37. package/dist/backgroundThreadBase.js.map +1 -1
  38. package/dist/commands/dumpFileDebugInfoCommand.js +0 -1
  39. package/dist/commands/dumpFileDebugInfoCommand.js.map +1 -1
  40. package/dist/common/configOptions.d.ts +1 -0
  41. package/dist/common/configOptions.js +9 -4
  42. package/dist/common/configOptions.js.map +1 -1
  43. package/dist/common/diagnosticRules.d.ts +1 -0
  44. package/dist/common/diagnosticRules.js +1 -0
  45. package/dist/common/diagnosticRules.js.map +1 -1
  46. package/dist/common/fullAccessHost.js +7 -3
  47. package/dist/common/fullAccessHost.js.map +1 -1
  48. package/dist/common/logTracker.d.ts +5 -5
  49. package/dist/common/logTracker.js +7 -6
  50. package/dist/common/logTracker.js.map +1 -1
  51. package/dist/common/pythonVersion.d.ts +36 -20
  52. package/dist/common/pythonVersion.js +160 -54
  53. package/dist/common/pythonVersion.js.map +1 -1
  54. package/dist/languageService/completionProvider.js +2 -2
  55. package/dist/languageService/completionProvider.js.map +1 -1
  56. package/dist/localization/localize.d.ts +4 -0
  57. package/dist/localization/localize.js +1 -8
  58. package/dist/localization/localize.js.map +1 -1
  59. package/dist/localization/package.nls.cs.json +13 -5
  60. package/dist/localization/package.nls.de.json +13 -5
  61. package/dist/localization/package.nls.en-us.json +1 -0
  62. package/dist/localization/package.nls.es.json +13 -5
  63. package/dist/localization/package.nls.fr.json +15 -7
  64. package/dist/localization/package.nls.it.json +11 -3
  65. package/dist/localization/package.nls.ja.json +13 -5
  66. package/dist/localization/package.nls.ko.json +13 -5
  67. package/dist/localization/package.nls.pl.json +13 -5
  68. package/dist/localization/package.nls.pt-br.json +13 -5
  69. package/dist/localization/package.nls.qps-ploc.json +13 -5
  70. package/dist/localization/package.nls.ru.json +12 -4
  71. package/dist/localization/package.nls.tr.json +13 -5
  72. package/dist/localization/package.nls.zh-cn.json +13 -5
  73. package/dist/localization/package.nls.zh-tw.json +13 -5
  74. package/dist/parser/parser.js +25 -22
  75. package/dist/parser/parser.js.map +1 -1
  76. package/dist/parser/stringTokenUtils.js +12 -12
  77. package/dist/parser/stringTokenUtils.js.map +1 -1
  78. package/dist/parser/tokenizer.d.ts +0 -1
  79. package/dist/parser/tokenizer.js +41 -41
  80. package/dist/parser/tokenizer.js.map +1 -1
  81. package/dist/parser/tokenizerTypes.d.ts +1 -2
  82. package/dist/parser/tokenizerTypes.js +0 -1
  83. package/dist/parser/tokenizerTypes.js.map +1 -1
  84. package/dist/parser/unicode.js +3456 -2853
  85. package/dist/parser/unicode.js.map +1 -1
  86. package/dist/pyright.js +1 -1
  87. package/dist/pyright.js.map +1 -1
  88. package/dist/tests/checker.test.js +11 -11
  89. package/dist/tests/checker.test.js.map +1 -1
  90. package/dist/tests/config.test.js +7 -7
  91. package/dist/tests/config.test.js.map +1 -1
  92. package/dist/tests/fourSlashParser.test.js +2 -2
  93. package/dist/tests/fourSlashParser.test.js.map +1 -1
  94. package/dist/tests/fourslash/completions.override2.fourslash.js +1 -1
  95. package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -1
  96. package/dist/tests/harness/fourslash/testLanguageService.d.ts +2 -1
  97. package/dist/tests/harness/fourslash/testLanguageService.js +2 -2
  98. package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -1
  99. package/dist/tests/languageServer.test.js +1 -1
  100. package/dist/tests/languageServer.test.js.map +1 -1
  101. package/dist/tests/lsp/customLsp.d.ts +1 -1
  102. package/dist/tests/lsp/languageServer.js +2 -1
  103. package/dist/tests/lsp/languageServer.js.map +1 -1
  104. package/dist/tests/lsp/languageServerTestUtils.js +6 -6
  105. package/dist/tests/lsp/languageServerTestUtils.js.map +1 -1
  106. package/dist/tests/typeEvaluator1.test.js +16 -12
  107. package/dist/tests/typeEvaluator1.test.js.map +1 -1
  108. package/dist/tests/typeEvaluator2.test.js +3 -3
  109. package/dist/tests/typeEvaluator2.test.js.map +1 -1
  110. package/dist/tests/typeEvaluator3.test.js +57 -57
  111. package/dist/tests/typeEvaluator3.test.js.map +1 -1
  112. package/dist/tests/typeEvaluator4.test.js +22 -22
  113. package/dist/tests/typeEvaluator4.test.js.map +1 -1
  114. package/dist/tests/typeEvaluator5.test.js +35 -33
  115. package/dist/tests/typeEvaluator5.test.js.map +1 -1
  116. package/package.json +1 -1
@@ -128,7 +128,7 @@ test('Coroutines1', () => {
128
128
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
129
129
  // This functionality is deprecated in Python 3.11, so the type no longer
130
130
  // exists in typing.pyi after that point.
131
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
131
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
132
132
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['coroutines1.py'], configOptions);
133
133
  TestUtils.validateResults(analysisResults, 4);
134
134
  });
@@ -140,7 +140,7 @@ test('Coroutines3', () => {
140
140
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
141
141
  // This functionality is deprecated in Python 3.11, so the type no longer
142
142
  // exists in typing.pyi after that point.
143
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
143
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
144
144
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['coroutines3.py'], configOptions);
145
145
  TestUtils.validateResults(analysisResults, 0);
146
146
  });
@@ -422,10 +422,10 @@ test('TypeAlias3', () => {
422
422
  });
423
423
  test('TypeAlias4', () => {
424
424
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
425
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_9;
425
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_9;
426
426
  const analysisResults3_9 = TestUtils.typeAnalyzeSampleFiles(['typeAlias4.py'], configOptions);
427
427
  TestUtils.validateResults(analysisResults3_9, 1);
428
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
428
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
429
429
  const analysisResults3_10 = TestUtils.typeAnalyzeSampleFiles(['typeAlias4.py'], configOptions);
430
430
  TestUtils.validateResults(analysisResults3_10, 11);
431
431
  });
@@ -511,7 +511,7 @@ test('RecursiveTypeAlias2', () => {
511
511
  });
512
512
  test('RecursiveTypeAlias3', () => {
513
513
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
514
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
514
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
515
515
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['recursiveTypeAlias3.py'], configOptions);
516
516
  TestUtils.validateResults(analysisResults, 4);
517
517
  });
@@ -615,7 +615,7 @@ test('MethodOverride1', () => {
615
615
  TestUtils.validateResults(analysisResults, 0);
616
616
  configOptions.diagnosticRuleSet.reportIncompatibleMethodOverride = 'error';
617
617
  analysisResults = TestUtils.typeAnalyzeSampleFiles(['methodOverride1.py'], configOptions);
618
- TestUtils.validateResults(analysisResults, 37);
618
+ TestUtils.validateResults(analysisResults, 38);
619
619
  });
620
620
  test('MethodOverride2', () => {
621
621
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
@@ -641,7 +641,7 @@ test('MethodOverride4', () => {
641
641
  });
642
642
  test('MethodOverride5', () => {
643
643
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
644
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
644
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
645
645
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['methodOverride5.py'], configOptions);
646
646
  TestUtils.validateResults(analysisResults, 0);
647
647
  });
@@ -748,259 +748,259 @@ test('ProtocolModule4', () => {
748
748
  });
749
749
  test('VariadicTypeVar1', () => {
750
750
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
751
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
751
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
752
752
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar1.py'], configOptions);
753
753
  TestUtils.validateResults(analysisResults, 19);
754
754
  });
755
755
  test('VariadicTypeVar2', () => {
756
756
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
757
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
757
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
758
758
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar2.py'], configOptions);
759
759
  TestUtils.validateResults(analysisResults, 15);
760
760
  });
761
761
  test('VariadicTypeVar3', () => {
762
762
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
763
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
763
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
764
764
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar3.py'], configOptions);
765
765
  TestUtils.validateResults(analysisResults, 5);
766
766
  });
767
767
  test('VariadicTypeVar4', () => {
768
768
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
769
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
769
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
770
770
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar4.py'], configOptions);
771
771
  TestUtils.validateResults(analysisResults, 4);
772
772
  });
773
773
  test('VariadicTypeVar5', () => {
774
774
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
775
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
775
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
776
776
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar5.py'], configOptions);
777
777
  TestUtils.validateResults(analysisResults, 9);
778
778
  });
779
779
  test('VariadicTypeVar6', () => {
780
780
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
781
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
781
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
782
782
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar6.py'], configOptions);
783
783
  TestUtils.validateResults(analysisResults, 10);
784
784
  });
785
785
  test('VariadicTypeVar7', () => {
786
786
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
787
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
787
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
788
788
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar7.py'], configOptions);
789
789
  TestUtils.validateResults(analysisResults, 6);
790
790
  });
791
791
  test('VariadicTypeVar8', () => {
792
792
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
793
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
793
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
794
794
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar8.py'], configOptions);
795
795
  TestUtils.validateResults(analysisResults, 5);
796
796
  });
797
797
  test('VariadicTypeVar9', () => {
798
798
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
799
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
799
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
800
800
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar9.py'], configOptions);
801
801
  TestUtils.validateResults(analysisResults, 0);
802
802
  });
803
803
  test('VariadicTypeVar10', () => {
804
804
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
805
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
805
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
806
806
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar10.py'], configOptions);
807
807
  TestUtils.validateResults(analysisResults, 2);
808
808
  });
809
809
  test('VariadicTypeVar11', () => {
810
810
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
811
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
811
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
812
812
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar11.py'], configOptions);
813
813
  TestUtils.validateResults(analysisResults, 4);
814
814
  });
815
815
  test('VariadicTypeVar12', () => {
816
816
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
817
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
817
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
818
818
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar12.py'], configOptions);
819
819
  TestUtils.validateResults(analysisResults, 0);
820
820
  });
821
821
  test('VariadicTypeVar13', () => {
822
822
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
823
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
823
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
824
824
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar13.py'], configOptions);
825
825
  TestUtils.validateResults(analysisResults, 1);
826
826
  });
827
827
  test('VariadicTypeVar14', () => {
828
828
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
829
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
829
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
830
830
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar14.py'], configOptions);
831
831
  TestUtils.validateResults(analysisResults, 6);
832
832
  });
833
833
  test('VariadicTypeVar15', () => {
834
834
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
835
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
835
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
836
836
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar15.py'], configOptions);
837
837
  TestUtils.validateResults(analysisResults, 0);
838
838
  });
839
839
  test('VariadicTypeVar16', () => {
840
840
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
841
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
841
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
842
842
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar16.py'], configOptions);
843
843
  TestUtils.validateResults(analysisResults, 0);
844
844
  });
845
845
  test('VariadicTypeVar17', () => {
846
846
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
847
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
847
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
848
848
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar17.py'], configOptions);
849
849
  TestUtils.validateResults(analysisResults, 0);
850
850
  });
851
851
  test('VariadicTypeVar18', () => {
852
852
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
853
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
853
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
854
854
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar18.py'], configOptions);
855
855
  TestUtils.validateResults(analysisResults, 2);
856
856
  });
857
857
  test('VariadicTypeVar19', () => {
858
858
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
859
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
859
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
860
860
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar19.py'], configOptions);
861
861
  TestUtils.validateResults(analysisResults, 0);
862
862
  });
863
863
  test('VariadicTypeVar20', () => {
864
864
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
865
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
865
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
866
866
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar20.py'], configOptions);
867
867
  TestUtils.validateResults(analysisResults, 0);
868
868
  });
869
869
  test('VariadicTypeVar21', () => {
870
870
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
871
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
871
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
872
872
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar21.py'], configOptions);
873
873
  TestUtils.validateResults(analysisResults, 0);
874
874
  });
875
875
  test('VariadicTypeVar22', () => {
876
876
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
877
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
877
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
878
878
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar22.py'], configOptions);
879
879
  TestUtils.validateResults(analysisResults, 3);
880
880
  });
881
881
  test('VariadicTypeVar23', () => {
882
882
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
883
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
883
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
884
884
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar23.py'], configOptions);
885
885
  TestUtils.validateResults(analysisResults, 0);
886
886
  });
887
887
  test('VariadicTypeVar24', () => {
888
888
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
889
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
889
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
890
890
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar24.py'], configOptions);
891
891
  TestUtils.validateResults(analysisResults, 0);
892
892
  });
893
893
  test('VariadicTypeVar25', () => {
894
894
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
895
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
895
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
896
896
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar25.py'], configOptions);
897
897
  TestUtils.validateResults(analysisResults, 0);
898
898
  });
899
899
  test('VariadicTypeVar26', () => {
900
900
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
901
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
901
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
902
902
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar26.py'], configOptions);
903
903
  TestUtils.validateResults(analysisResults, 3);
904
904
  });
905
905
  test('VariadicTypeVar27', () => {
906
906
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
907
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
907
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
908
908
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar27.py'], configOptions);
909
909
  TestUtils.validateResults(analysisResults, 1);
910
910
  });
911
911
  test('VariadicTypeVar28', () => {
912
912
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
913
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_11;
913
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
914
914
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar28.py'], configOptions);
915
915
  TestUtils.validateResults(analysisResults, 0);
916
916
  });
917
917
  test('Match1', () => {
918
918
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
919
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
919
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
920
920
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match1.py'], configOptions);
921
921
  TestUtils.validateResults(analysisResults, 21);
922
922
  });
923
923
  test('Match2', () => {
924
924
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
925
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
925
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
926
926
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match2.py'], configOptions);
927
927
  TestUtils.validateResults(analysisResults, 2);
928
928
  });
929
929
  test('Match3', () => {
930
930
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
931
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
931
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
932
932
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match3.py'], configOptions);
933
933
  TestUtils.validateResults(analysisResults, 0);
934
934
  });
935
935
  test('MatchSequence1', () => {
936
936
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
937
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
937
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
938
938
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchSequence1.py'], configOptions);
939
939
  TestUtils.validateResults(analysisResults, 2);
940
940
  });
941
941
  test('MatchClass1', () => {
942
942
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
943
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
943
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
944
944
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass1.py'], configOptions);
945
945
  TestUtils.validateResults(analysisResults, 4);
946
946
  });
947
947
  test('MatchClass2', () => {
948
948
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
949
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
949
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
950
950
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass2.py'], configOptions);
951
951
  TestUtils.validateResults(analysisResults, 0);
952
952
  });
953
953
  test('MatchClass3', () => {
954
954
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
955
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
955
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
956
956
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass3.py'], configOptions);
957
957
  TestUtils.validateResults(analysisResults, 0);
958
958
  });
959
959
  test('MatchClass4', () => {
960
960
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
961
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
961
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
962
962
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass4.py'], configOptions);
963
963
  TestUtils.validateResults(analysisResults, 0);
964
964
  });
965
965
  test('MatchClass5', () => {
966
966
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
967
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
967
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
968
968
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass5.py'], configOptions);
969
969
  TestUtils.validateResults(analysisResults, 5);
970
970
  });
971
971
  test('MatchClass6', () => {
972
972
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
973
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
973
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
974
974
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass6.py'], configOptions);
975
975
  TestUtils.validateResults(analysisResults, 0);
976
976
  });
977
977
  test('MatchValue1', () => {
978
978
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
979
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
979
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
980
980
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchValue1.py'], configOptions);
981
981
  TestUtils.validateResults(analysisResults, 0);
982
982
  });
983
983
  test('MatchMapping1', () => {
984
984
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
985
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
985
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
986
986
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchMapping1.py'], configOptions);
987
987
  TestUtils.validateResults(analysisResults, 2);
988
988
  });
989
989
  test('MatchLiteral1', () => {
990
990
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
991
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
991
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
992
992
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchLiteral1.py'], configOptions);
993
993
  TestUtils.validateResults(analysisResults, 0);
994
994
  });
995
995
  test('MatchLiteral2', () => {
996
996
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
997
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
997
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
998
998
  const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchLiteral2.py'], configOptions);
999
999
  TestUtils.validateResults(analysisResults, 0);
1000
1000
  });
1001
1001
  test('MatchExhaustion1', () => {
1002
1002
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
1003
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
1003
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
1004
1004
  configOptions.diagnosticRuleSet.reportMatchNotExhaustive = 'none';
1005
1005
  const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['matchExhaustion1.py'], configOptions);
1006
1006
  TestUtils.validateResults(analysisResults1, 0);
@@ -1010,7 +1010,7 @@ test('MatchExhaustion1', () => {
1010
1010
  });
1011
1011
  test('MatchUnnecessary1', () => {
1012
1012
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
1013
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_10;
1013
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
1014
1014
  const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['matchUnnecessary1.py'], configOptions);
1015
1015
  TestUtils.validateResults(analysisResults1, 0);
1016
1016
  configOptions.diagnosticRuleSet.reportUnnecessaryComparison = 'error';
@@ -1237,11 +1237,11 @@ test('FunctionAnnotation4', () => {
1237
1237
  test('Subscript1', () => {
1238
1238
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
1239
1239
  // Analyze with Python 3.8 settings.
1240
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_8;
1240
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_8;
1241
1241
  const analysisResults38 = TestUtils.typeAnalyzeSampleFiles(['subscript1.py'], configOptions);
1242
1242
  TestUtils.validateResults(analysisResults38, 18);
1243
1243
  // Analyze with Python 3.8 settings.
1244
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_9;
1244
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
1245
1245
  const analysisResults39 = TestUtils.typeAnalyzeSampleFiles(['subscript1.py'], configOptions);
1246
1246
  TestUtils.validateResults(analysisResults39, 0);
1247
1247
  });
@@ -1252,12 +1252,12 @@ test('Subscript2', () => {
1252
1252
  test('Subscript3', () => {
1253
1253
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
1254
1254
  // Analyze with Python 3.9 settings.
1255
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_9;
1255
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_9;
1256
1256
  const analysisResults39 = TestUtils.typeAnalyzeSampleFiles(['subscript3.py'], configOptions);
1257
1257
  TestUtils.validateResults(analysisResults39, 37);
1258
1258
  // Analyze with Python 3.10 settings.
1259
1259
  // These are disabled because PEP 637 was rejected.
1260
- // configOptions.defaultPythonVersion = PythonVersion.V3_10;
1260
+ // configOptions.defaultPythonVersion = pythonVersion3_10;
1261
1261
  // const analysisResults310 = TestUtils.typeAnalyzeSampleFiles(['subscript3.py'], configOptions);
1262
1262
  // TestUtils.validateResults(analysisResults310, 11);
1263
1263
  });
@@ -1276,11 +1276,11 @@ test('Decorator2', () => {
1276
1276
  test('Decorator3', () => {
1277
1277
  const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
1278
1278
  // Analyze with Python 3.8 settings.
1279
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_8;
1279
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_8;
1280
1280
  const analysisResults38 = TestUtils.typeAnalyzeSampleFiles(['decorator3.py'], configOptions);
1281
1281
  TestUtils.validateResults(analysisResults38, 3);
1282
1282
  // Analyze with Python 3.8 settings.
1283
- configOptions.defaultPythonVersion = pythonVersion_1.PythonVersion.V3_9;
1283
+ configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
1284
1284
  const analysisResults39 = TestUtils.typeAnalyzeSampleFiles(['decorator3.py'], configOptions);
1285
1285
  TestUtils.validateResults(analysisResults39, 0);
1286
1286
  });