@zzzen/pyright-internal 1.2.0-dev.20240428 → 1.2.0-dev.20240512
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.
- package/dist/analyzer/analyzerFileInfo.js +3 -2
- package/dist/analyzer/analyzerFileInfo.js.map +1 -1
- package/dist/analyzer/binder.js +6 -0
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/checker.js +62 -35
- package/dist/analyzer/checker.js.map +1 -1
- package/dist/analyzer/declaration.d.ts +1 -0
- package/dist/analyzer/declaration.js.map +1 -1
- package/dist/analyzer/operations.js +3 -2
- package/dist/analyzer/operations.js.map +1 -1
- package/dist/analyzer/patternMatching.js +20 -14
- package/dist/analyzer/patternMatching.js.map +1 -1
- package/dist/analyzer/scope.d.ts +4 -0
- package/dist/analyzer/scope.js +9 -2
- package/dist/analyzer/scope.js.map +1 -1
- package/dist/analyzer/sourceFile.js +13 -5
- package/dist/analyzer/sourceFile.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +56 -17
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/analyzer/typeGuards.d.ts +1 -1
- package/dist/analyzer/typeGuards.js +38 -19
- package/dist/analyzer/typeGuards.js.map +1 -1
- package/dist/analyzer/typeUtils.js +1 -5
- package/dist/analyzer/typeUtils.js.map +1 -1
- package/dist/analyzer/types.js +8 -0
- package/dist/analyzer/types.js.map +1 -1
- package/dist/common/envVarUtils.js +1 -2
- package/dist/common/envVarUtils.js.map +1 -1
- package/dist/common/pythonVersion.d.ts +1 -0
- package/dist/common/pythonVersion.js +2 -1
- package/dist/common/pythonVersion.js.map +1 -1
- package/dist/languageServerBase.d.ts +3 -2
- package/dist/languageServerBase.js +13 -35
- package/dist/languageServerBase.js.map +1 -1
- package/dist/languageService/callHierarchyProvider.js +1 -1
- package/dist/languageService/callHierarchyProvider.js.map +1 -1
- package/dist/languageService/dynamicFeature.d.ts +18 -0
- package/dist/languageService/dynamicFeature.js +54 -0
- package/dist/languageService/dynamicFeature.js.map +1 -0
- package/dist/languageService/fileWatcherDynamicFeature.d.ts +12 -0
- package/dist/languageService/fileWatcherDynamicFeature.js +49 -0
- package/dist/languageService/fileWatcherDynamicFeature.js.map +1 -0
- package/dist/localization/package.nls.cs.json +28 -26
- package/dist/localization/package.nls.de.json +28 -26
- package/dist/localization/package.nls.en-us.json +2 -2
- package/dist/localization/package.nls.es.json +27 -25
- package/dist/localization/package.nls.fr.json +28 -26
- package/dist/localization/package.nls.it.json +28 -26
- package/dist/localization/package.nls.ja.json +28 -26
- package/dist/localization/package.nls.ko.json +28 -26
- package/dist/localization/package.nls.pl.json +27 -25
- package/dist/localization/package.nls.pt-br.json +28 -26
- package/dist/localization/package.nls.qps-ploc.json +25 -23
- package/dist/localization/package.nls.ru.json +28 -26
- package/dist/localization/package.nls.tr.json +28 -26
- package/dist/localization/package.nls.zh-cn.json +28 -26
- package/dist/localization/package.nls.zh-tw.json +28 -26
- package/dist/parser/tokenizer.js +7 -1
- package/dist/parser/tokenizer.js.map +1 -1
- package/dist/tests/envVarUtils.test.js +20 -0
- package/dist/tests/envVarUtils.test.js.map +1 -1
- package/dist/tests/parser.test.js +7 -2
- package/dist/tests/parser.test.js.map +1 -1
- package/dist/tests/typeEvaluator1.test.js +59 -479
- package/dist/tests/typeEvaluator1.test.js.map +1 -1
- package/dist/tests/typeEvaluator2.test.js +4 -486
- package/dist/tests/typeEvaluator2.test.js.map +1 -1
- package/dist/tests/typeEvaluator3.test.js +0 -604
- package/dist/tests/typeEvaluator3.test.js.map +1 -1
- package/dist/tests/typeEvaluator4.test.js +1 -423
- package/dist/tests/typeEvaluator4.test.js.map +1 -1
- package/dist/tests/typeEvaluator6.test.d.ts +1 -0
- package/dist/tests/typeEvaluator6.test.js +712 -0
- package/dist/tests/typeEvaluator6.test.js.map +1 -0
- package/dist/tests/typeEvaluator7.test.d.ts +1 -0
- package/dist/tests/typeEvaluator7.test.js +677 -0
- package/dist/tests/typeEvaluator7.test.js.map +1 -0
- package/dist/tests/typeEvaluator8.test.d.ts +1 -0
- package/dist/tests/typeEvaluator8.test.js +660 -0
- package/dist/tests/typeEvaluator8.test.js.map +1 -0
- package/package.json +1 -1
@@ -706,608 +706,4 @@ test('EnumGenNextValue1', () => {
|
|
706
706
|
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['enumGenNextValue1.py']);
|
707
707
|
TestUtils.validateResults(analysisResults, 0);
|
708
708
|
});
|
709
|
-
test('TypeGuard1', () => {
|
710
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeGuard1.py']);
|
711
|
-
TestUtils.validateResults(analysisResults, 8);
|
712
|
-
});
|
713
|
-
test('TypeGuard2', () => {
|
714
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeGuard2.py']);
|
715
|
-
TestUtils.validateResults(analysisResults, 0);
|
716
|
-
});
|
717
|
-
test('TypeGuard3', () => {
|
718
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeGuard3.py']);
|
719
|
-
TestUtils.validateResults(analysisResults, 0);
|
720
|
-
});
|
721
|
-
test('TypeIs1', () => {
|
722
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeIs1.py']);
|
723
|
-
TestUtils.validateResults(analysisResults, 2);
|
724
|
-
});
|
725
|
-
test('Never1', () => {
|
726
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['never1.py']);
|
727
|
-
TestUtils.validateResults(analysisResults, 5);
|
728
|
-
});
|
729
|
-
test('Never2', () => {
|
730
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['never2.py']);
|
731
|
-
TestUtils.validateResults(analysisResults, 1);
|
732
|
-
});
|
733
|
-
test('TypePromotions1', () => {
|
734
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typePromotions1.py']);
|
735
|
-
TestUtils.validateResults(analysisResults, 0);
|
736
|
-
});
|
737
|
-
test('Index1', () => {
|
738
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['index1.py']);
|
739
|
-
TestUtils.validateResults(analysisResults, 10);
|
740
|
-
});
|
741
|
-
test('ProtocolModule2', () => {
|
742
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['protocolModule2.py']);
|
743
|
-
TestUtils.validateResults(analysisResults, 3);
|
744
|
-
});
|
745
|
-
test('ProtocolModule4', () => {
|
746
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['protocolModule4.py']);
|
747
|
-
TestUtils.validateResults(analysisResults, 1);
|
748
|
-
});
|
749
|
-
test('VariadicTypeVar1', () => {
|
750
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
751
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
752
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar1.py'], configOptions);
|
753
|
-
TestUtils.validateResults(analysisResults, 19);
|
754
|
-
});
|
755
|
-
test('VariadicTypeVar2', () => {
|
756
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
757
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
758
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar2.py'], configOptions);
|
759
|
-
TestUtils.validateResults(analysisResults, 15);
|
760
|
-
});
|
761
|
-
test('VariadicTypeVar3', () => {
|
762
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
763
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
764
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar3.py'], configOptions);
|
765
|
-
TestUtils.validateResults(analysisResults, 5);
|
766
|
-
});
|
767
|
-
test('VariadicTypeVar4', () => {
|
768
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
769
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
770
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar4.py'], configOptions);
|
771
|
-
TestUtils.validateResults(analysisResults, 4);
|
772
|
-
});
|
773
|
-
test('VariadicTypeVar5', () => {
|
774
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
775
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
776
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar5.py'], configOptions);
|
777
|
-
TestUtils.validateResults(analysisResults, 9);
|
778
|
-
});
|
779
|
-
test('VariadicTypeVar6', () => {
|
780
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
781
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
782
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar6.py'], configOptions);
|
783
|
-
TestUtils.validateResults(analysisResults, 10);
|
784
|
-
});
|
785
|
-
test('VariadicTypeVar7', () => {
|
786
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
787
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
788
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar7.py'], configOptions);
|
789
|
-
TestUtils.validateResults(analysisResults, 6);
|
790
|
-
});
|
791
|
-
test('VariadicTypeVar8', () => {
|
792
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
793
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
794
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar8.py'], configOptions);
|
795
|
-
TestUtils.validateResults(analysisResults, 5);
|
796
|
-
});
|
797
|
-
test('VariadicTypeVar9', () => {
|
798
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
799
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
800
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar9.py'], configOptions);
|
801
|
-
TestUtils.validateResults(analysisResults, 0);
|
802
|
-
});
|
803
|
-
test('VariadicTypeVar10', () => {
|
804
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
805
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
806
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar10.py'], configOptions);
|
807
|
-
TestUtils.validateResults(analysisResults, 2);
|
808
|
-
});
|
809
|
-
test('VariadicTypeVar11', () => {
|
810
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
811
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
812
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar11.py'], configOptions);
|
813
|
-
TestUtils.validateResults(analysisResults, 4);
|
814
|
-
});
|
815
|
-
test('VariadicTypeVar12', () => {
|
816
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
817
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
818
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar12.py'], configOptions);
|
819
|
-
TestUtils.validateResults(analysisResults, 0);
|
820
|
-
});
|
821
|
-
test('VariadicTypeVar13', () => {
|
822
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
823
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
824
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar13.py'], configOptions);
|
825
|
-
TestUtils.validateResults(analysisResults, 1);
|
826
|
-
});
|
827
|
-
test('VariadicTypeVar14', () => {
|
828
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
829
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
830
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar14.py'], configOptions);
|
831
|
-
TestUtils.validateResults(analysisResults, 6);
|
832
|
-
});
|
833
|
-
test('VariadicTypeVar15', () => {
|
834
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
835
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
836
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar15.py'], configOptions);
|
837
|
-
TestUtils.validateResults(analysisResults, 0);
|
838
|
-
});
|
839
|
-
test('VariadicTypeVar16', () => {
|
840
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
841
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
842
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar16.py'], configOptions);
|
843
|
-
TestUtils.validateResults(analysisResults, 0);
|
844
|
-
});
|
845
|
-
test('VariadicTypeVar17', () => {
|
846
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
847
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
848
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar17.py'], configOptions);
|
849
|
-
TestUtils.validateResults(analysisResults, 0);
|
850
|
-
});
|
851
|
-
test('VariadicTypeVar18', () => {
|
852
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
853
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
854
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar18.py'], configOptions);
|
855
|
-
TestUtils.validateResults(analysisResults, 2);
|
856
|
-
});
|
857
|
-
test('VariadicTypeVar19', () => {
|
858
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
859
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
860
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar19.py'], configOptions);
|
861
|
-
TestUtils.validateResults(analysisResults, 0);
|
862
|
-
});
|
863
|
-
test('VariadicTypeVar20', () => {
|
864
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
865
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
866
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar20.py'], configOptions);
|
867
|
-
TestUtils.validateResults(analysisResults, 0);
|
868
|
-
});
|
869
|
-
test('VariadicTypeVar21', () => {
|
870
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
871
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
872
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar21.py'], configOptions);
|
873
|
-
TestUtils.validateResults(analysisResults, 0);
|
874
|
-
});
|
875
|
-
test('VariadicTypeVar22', () => {
|
876
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
877
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
878
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar22.py'], configOptions);
|
879
|
-
TestUtils.validateResults(analysisResults, 3);
|
880
|
-
});
|
881
|
-
test('VariadicTypeVar23', () => {
|
882
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
883
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
884
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar23.py'], configOptions);
|
885
|
-
TestUtils.validateResults(analysisResults, 0);
|
886
|
-
});
|
887
|
-
test('VariadicTypeVar24', () => {
|
888
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
889
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
890
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar24.py'], configOptions);
|
891
|
-
TestUtils.validateResults(analysisResults, 0);
|
892
|
-
});
|
893
|
-
test('VariadicTypeVar25', () => {
|
894
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
895
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
896
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar25.py'], configOptions);
|
897
|
-
TestUtils.validateResults(analysisResults, 0);
|
898
|
-
});
|
899
|
-
test('VariadicTypeVar26', () => {
|
900
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
901
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
902
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar26.py'], configOptions);
|
903
|
-
TestUtils.validateResults(analysisResults, 3);
|
904
|
-
});
|
905
|
-
test('VariadicTypeVar27', () => {
|
906
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
907
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
908
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar27.py'], configOptions);
|
909
|
-
TestUtils.validateResults(analysisResults, 1);
|
910
|
-
});
|
911
|
-
test('VariadicTypeVar28', () => {
|
912
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
913
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_11;
|
914
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar28.py'], configOptions);
|
915
|
-
TestUtils.validateResults(analysisResults, 0);
|
916
|
-
});
|
917
|
-
test('VariadicTypeVar29', () => {
|
918
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
919
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_12;
|
920
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['variadicTypeVar29.py'], configOptions);
|
921
|
-
TestUtils.validateResults(analysisResults, 0);
|
922
|
-
});
|
923
|
-
test('Match1', () => {
|
924
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
925
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
926
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match1.py'], configOptions);
|
927
|
-
TestUtils.validateResults(analysisResults, 21);
|
928
|
-
});
|
929
|
-
test('Match2', () => {
|
930
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
931
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
932
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match2.py'], configOptions);
|
933
|
-
TestUtils.validateResults(analysisResults, 2);
|
934
|
-
});
|
935
|
-
test('Match3', () => {
|
936
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
937
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
938
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['match3.py'], configOptions);
|
939
|
-
TestUtils.validateResults(analysisResults, 0);
|
940
|
-
});
|
941
|
-
test('MatchSequence1', () => {
|
942
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
943
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
944
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchSequence1.py'], configOptions);
|
945
|
-
TestUtils.validateResults(analysisResults, 2);
|
946
|
-
});
|
947
|
-
test('MatchClass1', () => {
|
948
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
949
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
950
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass1.py'], configOptions);
|
951
|
-
TestUtils.validateResults(analysisResults, 5);
|
952
|
-
});
|
953
|
-
test('MatchClass2', () => {
|
954
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
955
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
956
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass2.py'], configOptions);
|
957
|
-
TestUtils.validateResults(analysisResults, 0);
|
958
|
-
});
|
959
|
-
test('MatchClass3', () => {
|
960
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
961
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
962
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass3.py'], configOptions);
|
963
|
-
TestUtils.validateResults(analysisResults, 0);
|
964
|
-
});
|
965
|
-
test('MatchClass4', () => {
|
966
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
967
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
968
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass4.py'], configOptions);
|
969
|
-
TestUtils.validateResults(analysisResults, 0);
|
970
|
-
});
|
971
|
-
test('MatchClass5', () => {
|
972
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
973
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
974
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass5.py'], configOptions);
|
975
|
-
TestUtils.validateResults(analysisResults, 5);
|
976
|
-
});
|
977
|
-
test('MatchClass6', () => {
|
978
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
979
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
980
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchClass6.py'], configOptions);
|
981
|
-
TestUtils.validateResults(analysisResults, 0);
|
982
|
-
});
|
983
|
-
test('MatchValue1', () => {
|
984
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
985
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
986
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchValue1.py'], configOptions);
|
987
|
-
TestUtils.validateResults(analysisResults, 0);
|
988
|
-
});
|
989
|
-
test('MatchMapping1', () => {
|
990
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
991
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
992
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchMapping1.py'], configOptions);
|
993
|
-
TestUtils.validateResults(analysisResults, 2);
|
994
|
-
});
|
995
|
-
test('MatchLiteral1', () => {
|
996
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
997
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
998
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchLiteral1.py'], configOptions);
|
999
|
-
TestUtils.validateResults(analysisResults, 0);
|
1000
|
-
});
|
1001
|
-
test('MatchLiteral2', () => {
|
1002
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1003
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
1004
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['matchLiteral2.py'], configOptions);
|
1005
|
-
TestUtils.validateResults(analysisResults, 0);
|
1006
|
-
});
|
1007
|
-
test('MatchExhaustion1', () => {
|
1008
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1009
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
1010
|
-
configOptions.diagnosticRuleSet.reportMatchNotExhaustive = 'none';
|
1011
|
-
const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['matchExhaustion1.py'], configOptions);
|
1012
|
-
TestUtils.validateResults(analysisResults1, 0);
|
1013
|
-
configOptions.diagnosticRuleSet.reportMatchNotExhaustive = 'error';
|
1014
|
-
const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['matchExhaustion1.py'], configOptions);
|
1015
|
-
TestUtils.validateResults(analysisResults2, 4);
|
1016
|
-
});
|
1017
|
-
test('MatchUnnecessary1', () => {
|
1018
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1019
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
1020
|
-
const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['matchUnnecessary1.py'], configOptions);
|
1021
|
-
TestUtils.validateResults(analysisResults1, 0);
|
1022
|
-
configOptions.diagnosticRuleSet.reportUnnecessaryComparison = 'error';
|
1023
|
-
const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['matchUnnecessary1.py'], configOptions);
|
1024
|
-
TestUtils.validateResults(analysisResults2, 7);
|
1025
|
-
});
|
1026
|
-
test('List1', () => {
|
1027
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['list1.py']);
|
1028
|
-
TestUtils.validateResults(analysisResults, 3);
|
1029
|
-
});
|
1030
|
-
test('List2', () => {
|
1031
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['list2.py']);
|
1032
|
-
TestUtils.validateResults(analysisResults, 0);
|
1033
|
-
});
|
1034
|
-
test('List3', () => {
|
1035
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['list3.py']);
|
1036
|
-
TestUtils.validateResults(analysisResults, 0);
|
1037
|
-
});
|
1038
|
-
test('Comparison1', () => {
|
1039
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1040
|
-
const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['comparison1.py'], configOptions);
|
1041
|
-
TestUtils.validateResults(analysisResults1, 0);
|
1042
|
-
configOptions.diagnosticRuleSet.reportUnnecessaryComparison = 'error';
|
1043
|
-
const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['comparison1.py'], configOptions);
|
1044
|
-
TestUtils.validateResults(analysisResults2, 7);
|
1045
|
-
});
|
1046
|
-
test('Comparison2', () => {
|
1047
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1048
|
-
const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['comparison2.py'], configOptions);
|
1049
|
-
TestUtils.validateResults(analysisResults1, 0);
|
1050
|
-
configOptions.diagnosticRuleSet.reportUnnecessaryComparison = 'error';
|
1051
|
-
const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['comparison2.py'], configOptions);
|
1052
|
-
TestUtils.validateResults(analysisResults2, 11);
|
1053
|
-
});
|
1054
|
-
test('EmptyContainers1', () => {
|
1055
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['emptyContainers1.py']);
|
1056
|
-
TestUtils.validateResults(analysisResults, 5);
|
1057
|
-
});
|
1058
|
-
test('InitSubclass1', () => {
|
1059
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['initsubclass1.py']);
|
1060
|
-
TestUtils.validateResults(analysisResults, 6);
|
1061
|
-
});
|
1062
|
-
test('InitSubclass2', () => {
|
1063
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['initsubclass2.py']);
|
1064
|
-
TestUtils.validateResults(analysisResults, 2);
|
1065
|
-
});
|
1066
|
-
test('None1', () => {
|
1067
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['none1.py']);
|
1068
|
-
TestUtils.validateResults(analysisResults, 1);
|
1069
|
-
});
|
1070
|
-
test('None2', () => {
|
1071
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['none2.py']);
|
1072
|
-
TestUtils.validateResults(analysisResults, 2);
|
1073
|
-
});
|
1074
|
-
test('Constructor1', () => {
|
1075
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor1.py']);
|
1076
|
-
TestUtils.validateResults(analysisResults, 0);
|
1077
|
-
});
|
1078
|
-
test('Constructor2', () => {
|
1079
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor2.py']);
|
1080
|
-
TestUtils.validateResults(analysisResults, 0);
|
1081
|
-
});
|
1082
|
-
test('Constructor3', () => {
|
1083
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor3.py']);
|
1084
|
-
TestUtils.validateResults(analysisResults, 0);
|
1085
|
-
});
|
1086
|
-
test('Constructor4', () => {
|
1087
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor4.py']);
|
1088
|
-
TestUtils.validateResults(analysisResults, 1);
|
1089
|
-
});
|
1090
|
-
test('Constructor5', () => {
|
1091
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor5.py']);
|
1092
|
-
TestUtils.validateResults(analysisResults, 0);
|
1093
|
-
});
|
1094
|
-
test('Constructor6', () => {
|
1095
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor6.py']);
|
1096
|
-
TestUtils.validateResults(analysisResults, 0, 1);
|
1097
|
-
});
|
1098
|
-
test('Constructor7', () => {
|
1099
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor7.py']);
|
1100
|
-
TestUtils.validateResults(analysisResults, 0);
|
1101
|
-
});
|
1102
|
-
test('Constructor9', () => {
|
1103
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor9.py']);
|
1104
|
-
TestUtils.validateResults(analysisResults, 0);
|
1105
|
-
});
|
1106
|
-
test('Constructor10', () => {
|
1107
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor10.py']);
|
1108
|
-
TestUtils.validateResults(analysisResults, 0);
|
1109
|
-
});
|
1110
|
-
test('Constructor11', () => {
|
1111
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor11.py']);
|
1112
|
-
TestUtils.validateResults(analysisResults, 0);
|
1113
|
-
});
|
1114
|
-
test('Constructor12', () => {
|
1115
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor12.py']);
|
1116
|
-
TestUtils.validateResults(analysisResults, 0);
|
1117
|
-
});
|
1118
|
-
test('Constructor13', () => {
|
1119
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor13.py']);
|
1120
|
-
TestUtils.validateResults(analysisResults, 1);
|
1121
|
-
});
|
1122
|
-
test('Constructor14', () => {
|
1123
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor14.py']);
|
1124
|
-
TestUtils.validateResults(analysisResults, 0);
|
1125
|
-
});
|
1126
|
-
test('Constructor15', () => {
|
1127
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor15.py']);
|
1128
|
-
TestUtils.validateResults(analysisResults, 0);
|
1129
|
-
});
|
1130
|
-
test('Constructor16', () => {
|
1131
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor16.py']);
|
1132
|
-
TestUtils.validateResults(analysisResults, 2);
|
1133
|
-
});
|
1134
|
-
test('Constructor17', () => {
|
1135
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor17.py']);
|
1136
|
-
TestUtils.validateResults(analysisResults, 0);
|
1137
|
-
});
|
1138
|
-
test('Constructor18', () => {
|
1139
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor18.py']);
|
1140
|
-
TestUtils.validateResults(analysisResults, 0);
|
1141
|
-
});
|
1142
|
-
test('Constructor19', () => {
|
1143
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor19.py']);
|
1144
|
-
TestUtils.validateResults(analysisResults, 1);
|
1145
|
-
});
|
1146
|
-
test('Constructor20', () => {
|
1147
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor20.py']);
|
1148
|
-
TestUtils.validateResults(analysisResults, 2);
|
1149
|
-
});
|
1150
|
-
test('Constructor21', () => {
|
1151
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor21.py']);
|
1152
|
-
TestUtils.validateResults(analysisResults, 2);
|
1153
|
-
});
|
1154
|
-
test('Constructor22', () => {
|
1155
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor22.py']);
|
1156
|
-
TestUtils.validateResults(analysisResults, 0);
|
1157
|
-
});
|
1158
|
-
test('Constructor23', () => {
|
1159
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor23.py']);
|
1160
|
-
TestUtils.validateResults(analysisResults, 0);
|
1161
|
-
});
|
1162
|
-
test('Constructor24', () => {
|
1163
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1164
|
-
configOptions.diagnosticRuleSet.strictParameterNoneValue = false;
|
1165
|
-
let analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor24.py'], configOptions);
|
1166
|
-
TestUtils.validateResults(analysisResults, 4);
|
1167
|
-
configOptions.diagnosticRuleSet.strictParameterNoneValue = true;
|
1168
|
-
analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor24.py'], configOptions);
|
1169
|
-
TestUtils.validateResults(analysisResults, 5);
|
1170
|
-
});
|
1171
|
-
test('Constructor25', () => {
|
1172
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor25.py']);
|
1173
|
-
TestUtils.validateResults(analysisResults, 1);
|
1174
|
-
});
|
1175
|
-
test('Constructor26', () => {
|
1176
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor26.py']);
|
1177
|
-
TestUtils.validateResults(analysisResults, 8);
|
1178
|
-
});
|
1179
|
-
test('Constructor27', () => {
|
1180
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor27.py']);
|
1181
|
-
TestUtils.validateResults(analysisResults, 0);
|
1182
|
-
});
|
1183
|
-
test('Constructor28', () => {
|
1184
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor28.py']);
|
1185
|
-
TestUtils.validateResults(analysisResults, 1);
|
1186
|
-
});
|
1187
|
-
test('Constructor29', () => {
|
1188
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructor29.py']);
|
1189
|
-
TestUtils.validateResults(analysisResults, 0);
|
1190
|
-
});
|
1191
|
-
test('ConstructorCallable1', () => {
|
1192
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructorCallable1.py']);
|
1193
|
-
TestUtils.validateResults(analysisResults, 4);
|
1194
|
-
});
|
1195
|
-
test('ConstructorCallable2', () => {
|
1196
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['constructorCallable2.py']);
|
1197
|
-
TestUtils.validateResults(analysisResults, 0);
|
1198
|
-
});
|
1199
|
-
test('InconsistentConstructor1', () => {
|
1200
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1201
|
-
configOptions.diagnosticRuleSet.reportInconsistentConstructor = 'none';
|
1202
|
-
let analysisResults = TestUtils.typeAnalyzeSampleFiles(['inconsistentConstructor1.py'], configOptions);
|
1203
|
-
TestUtils.validateResults(analysisResults, 0);
|
1204
|
-
// Enable it as an error.
|
1205
|
-
configOptions.diagnosticRuleSet.reportInconsistentConstructor = 'error';
|
1206
|
-
analysisResults = TestUtils.typeAnalyzeSampleFiles(['inconsistentConstructor1.py'], configOptions);
|
1207
|
-
TestUtils.validateResults(analysisResults, 2);
|
1208
|
-
});
|
1209
|
-
test('ClassGetItem1', () => {
|
1210
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['classGetItem1.py']);
|
1211
|
-
TestUtils.validateResults(analysisResults, 0, 1);
|
1212
|
-
});
|
1213
|
-
test('UnusedCallResult1', () => {
|
1214
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1215
|
-
// By default, this is disabled.
|
1216
|
-
let analysisResults = TestUtils.typeAnalyzeSampleFiles(['unusedCallResult1.py'], configOptions);
|
1217
|
-
TestUtils.validateResults(analysisResults, 0);
|
1218
|
-
// Enable it as an error.
|
1219
|
-
configOptions.diagnosticRuleSet.reportUnusedCallResult = 'error';
|
1220
|
-
analysisResults = TestUtils.typeAnalyzeSampleFiles(['unusedCallResult1.py'], configOptions);
|
1221
|
-
TestUtils.validateResults(analysisResults, 4);
|
1222
|
-
});
|
1223
|
-
test('UnusedCoroutine1', () => {
|
1224
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['unusedCoroutine1.py']);
|
1225
|
-
TestUtils.validateResults(analysisResults, 2);
|
1226
|
-
});
|
1227
|
-
test('FunctionAnnotation1', () => {
|
1228
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['functionAnnotation1.py']);
|
1229
|
-
TestUtils.validateResults(analysisResults, 1);
|
1230
|
-
});
|
1231
|
-
test('FunctionAnnotation2', () => {
|
1232
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['functionAnnotation2.py']);
|
1233
|
-
TestUtils.validateResults(analysisResults, 4);
|
1234
|
-
});
|
1235
|
-
test('FunctionAnnotation3', () => {
|
1236
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['functionAnnotation3.py']);
|
1237
|
-
TestUtils.validateResults(analysisResults, 2);
|
1238
|
-
});
|
1239
|
-
test('FunctionAnnotation4', () => {
|
1240
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1241
|
-
const analysisResults1 = TestUtils.typeAnalyzeSampleFiles(['functionAnnotation4.py'], configOptions);
|
1242
|
-
TestUtils.validateResults(analysisResults1, 0);
|
1243
|
-
configOptions.diagnosticRuleSet.reportTypeCommentUsage = 'error';
|
1244
|
-
const analysisResults2 = TestUtils.typeAnalyzeSampleFiles(['functionAnnotation4.py'], configOptions);
|
1245
|
-
TestUtils.validateResults(analysisResults2, 3);
|
1246
|
-
});
|
1247
|
-
test('Subscript1', () => {
|
1248
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1249
|
-
// Analyze with Python 3.8 settings.
|
1250
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_8;
|
1251
|
-
const analysisResults38 = TestUtils.typeAnalyzeSampleFiles(['subscript1.py'], configOptions);
|
1252
|
-
TestUtils.validateResults(analysisResults38, 18);
|
1253
|
-
// Analyze with Python 3.8 settings.
|
1254
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
1255
|
-
const analysisResults39 = TestUtils.typeAnalyzeSampleFiles(['subscript1.py'], configOptions);
|
1256
|
-
TestUtils.validateResults(analysisResults39, 0);
|
1257
|
-
});
|
1258
|
-
test('Subscript2', () => {
|
1259
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['subscript2.py']);
|
1260
|
-
TestUtils.validateResults(analysisResults, 8);
|
1261
|
-
});
|
1262
|
-
test('Subscript3', () => {
|
1263
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1264
|
-
// Analyze with Python 3.9 settings.
|
1265
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_9;
|
1266
|
-
const analysisResults39 = TestUtils.typeAnalyzeSampleFiles(['subscript3.py'], configOptions);
|
1267
|
-
TestUtils.validateResults(analysisResults39, 37);
|
1268
|
-
// Analyze with Python 3.10 settings.
|
1269
|
-
// These are disabled because PEP 637 was rejected.
|
1270
|
-
// configOptions.defaultPythonVersion = pythonVersion3_10;
|
1271
|
-
// const analysisResults310 = TestUtils.typeAnalyzeSampleFiles(['subscript3.py'], configOptions);
|
1272
|
-
// TestUtils.validateResults(analysisResults310, 11);
|
1273
|
-
});
|
1274
|
-
test('Subscript4', () => {
|
1275
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['subscript4.py']);
|
1276
|
-
TestUtils.validateResults(analysisResults, 0);
|
1277
|
-
});
|
1278
|
-
test('Decorator1', () => {
|
1279
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['decorator1.py']);
|
1280
|
-
TestUtils.validateResults(analysisResults, 0);
|
1281
|
-
});
|
1282
|
-
test('Decorator2', () => {
|
1283
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['decorator2.py']);
|
1284
|
-
TestUtils.validateResults(analysisResults, 0);
|
1285
|
-
});
|
1286
|
-
test('Decorator3', () => {
|
1287
|
-
const configOptions = new configOptions_1.ConfigOptions(uri_1.Uri.empty());
|
1288
|
-
// Analyze with Python 3.8 settings.
|
1289
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_8;
|
1290
|
-
const analysisResults38 = TestUtils.typeAnalyzeSampleFiles(['decorator3.py'], configOptions);
|
1291
|
-
TestUtils.validateResults(analysisResults38, 3);
|
1292
|
-
// Analyze with Python 3.8 settings.
|
1293
|
-
configOptions.defaultPythonVersion = pythonVersion_1.pythonVersion3_10;
|
1294
|
-
const analysisResults39 = TestUtils.typeAnalyzeSampleFiles(['decorator3.py'], configOptions);
|
1295
|
-
TestUtils.validateResults(analysisResults39, 0);
|
1296
|
-
});
|
1297
|
-
test('Decorator4', () => {
|
1298
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['decorator4.py']);
|
1299
|
-
TestUtils.validateResults(analysisResults, 0);
|
1300
|
-
});
|
1301
|
-
test('Decorator5', () => {
|
1302
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['decorator5.py']);
|
1303
|
-
TestUtils.validateResults(analysisResults, 0);
|
1304
|
-
});
|
1305
|
-
test('Decorator6', () => {
|
1306
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['decorator6.py']);
|
1307
|
-
TestUtils.validateResults(analysisResults, 0);
|
1308
|
-
});
|
1309
|
-
test('Decorator7', () => {
|
1310
|
-
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['decorator7.py']);
|
1311
|
-
TestUtils.validateResults(analysisResults, 0);
|
1312
|
-
});
|
1313
709
|
//# sourceMappingURL=typeEvaluator3.test.js.map
|