@zzzen/pyright-internal 1.2.0-dev.20241229 → 1.2.0-dev.20250112
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/importStatementUtils.js +1 -1
- package/dist/analyzer/importStatementUtils.js.map +1 -1
- package/dist/analyzer/parentDirectoryCache.js +1 -1
- package/dist/analyzer/parentDirectoryCache.js.map +1 -1
- package/dist/analyzer/parseTreeUtils.d.ts +2 -1
- package/dist/analyzer/parseTreeUtils.js +22 -15
- package/dist/analyzer/parseTreeUtils.js.map +1 -1
- package/dist/analyzer/properties.js +1 -1
- package/dist/analyzer/properties.js.map +1 -1
- package/dist/analyzer/protocols.js +1 -1
- package/dist/analyzer/protocols.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +40 -16
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/analyzer/typeEvaluatorTypes.d.ts +1 -1
- package/dist/analyzer/types.js +1 -1
- package/dist/analyzer/types.js.map +1 -1
- package/dist/languageService/autoImporter.d.ts +6 -8
- package/dist/languageService/autoImporter.js +23 -16
- package/dist/languageService/autoImporter.js.map +1 -1
- package/dist/languageService/completionProviderUtils.js +1 -2
- package/dist/languageService/completionProviderUtils.js.map +1 -1
- package/dist/localization/localize.d.ts +1 -0
- package/dist/localization/localize.js +1 -0
- package/dist/localization/localize.js.map +1 -1
- package/dist/localization/package.nls.cs.json +4 -4
- package/dist/localization/package.nls.de.json +4 -4
- package/dist/localization/package.nls.en-us.json +1 -0
- package/dist/localization/package.nls.es.json +4 -4
- package/dist/localization/package.nls.fr.json +4 -4
- package/dist/localization/package.nls.it.json +4 -4
- package/dist/localization/package.nls.ja.json +4 -4
- package/dist/localization/package.nls.ko.json +4 -4
- package/dist/localization/package.nls.pl.json +4 -4
- package/dist/localization/package.nls.pt-br.json +4 -4
- package/dist/localization/package.nls.qps-ploc.json +4 -4
- package/dist/localization/package.nls.ru.json +4 -4
- package/dist/localization/package.nls.tr.json +4 -4
- package/dist/localization/package.nls.zh-cn.json +4 -4
- package/dist/localization/package.nls.zh-tw.json +4 -4
- package/dist/parser/parser.js +13 -3
- package/dist/parser/parser.js.map +1 -1
- package/dist/parser/stringTokenUtils.d.ts +1 -1
- package/dist/parser/stringTokenUtils.js +4 -2
- package/dist/parser/stringTokenUtils.js.map +1 -1
- package/dist/tests/harness/fourslash/testState.js +8 -0
- package/dist/tests/harness/fourslash/testState.js.map +1 -1
- package/dist/tests/testUtils.d.ts +0 -1
- package/dist/tests/testUtils.js +29 -21
- package/dist/tests/testUtils.js.map +1 -1
- package/dist/tests/typeEvaluator4.test.js +1 -1
- package/package.json +5 -5
@@ -815,10 +815,10 @@
|
|
815
815
|
"unhashableType": "O tipo \"{type}\" não é pode fazer hash",
|
816
816
|
"uninitializedAbstractVariable": "A variável de instância \"{name}\" está definida na classe base abstrata \"{classType}\", mas não foi inicializada",
|
817
817
|
"unreachableExcept": "\"{exceptionType}\" é uma subclasse de \"{parentType}\"",
|
818
|
-
"useDictInstead": "Use
|
819
|
-
"useListInstead": "Use
|
820
|
-
"useTupleInstead": "Use tuple[T1, ..., Tn]
|
821
|
-
"useTypeInstead": "Use
|
818
|
+
"useDictInstead": "Use dict[T1, T2] to indicate a dictionary type",
|
819
|
+
"useListInstead": "Use list[T] to indicate a list type or T1 | T2 to indicate a union type",
|
820
|
+
"useTupleInstead": "Use tuple[T1, ..., Tn] to indicate a tuple type or T1 | T2 to indicate a union type",
|
821
|
+
"useTypeInstead": "Use type[T] instead",
|
822
822
|
"varianceMismatchForClass": "A variação do argumento de tipo \"{typeVarName}\" é incompatível com a classe base \"{className}\"",
|
823
823
|
"varianceMismatchForTypeAlias": "A variação do argumento de tipo \"{typeVarName}\" é incompatível com \"{typeAliasParam}\""
|
824
824
|
},
|
@@ -815,10 +815,10 @@
|
|
815
815
|
"unhashableType": "[IJEeq][นั้Tÿpë \"{tÿpë}\" ïs ñøt hæshæþlëẤğ倪İЂҰक्र्तिृนั้ढूँ]",
|
816
816
|
"uninitializedAbstractVariable": "[uDuHt][นั้Ïñstæñçë værïæþlë \"{ñæmë}\" ïs ðëfïñëð ïñ æþstræçt þæsë çlæss \"{çlæssTÿpë}\" þµt ñøt ïñïtïælïzëðẤğ倪İЂҰक्र्तिृまẤğ倪İЂҰक्र्तिृまẤğ倪İЂҰक्र्นั้ढूँ]",
|
817
817
|
"unreachableExcept": "[3CSUL][นั้\"{ëxçëptïøñTÿpë}\" ïs æ sµþçlæss øf \"{pærëñtTÿpë}\"Ấğ倪İЂҰक्र्तिृまẤğ倪İЂҰนั้ढूँ]",
|
818
|
-
"useDictInstead": "[LReB5][นั้Üsë
|
819
|
-
"useListInstead": "[RPu0E][นั้Üsë
|
820
|
-
"useTupleInstead": "[jaFqC][นั้Üsë tuple[T1, ..., Tn] tø ïñðïçætë æ tuple tÿpë ør
|
821
|
-
"useTypeInstead": "[Zig8D][นั้Üsë
|
818
|
+
"useDictInstead": "[LReB5][นั้Üsë dict[T1, T2] tø ïñðïçætë æ ðïçtïøñærÿ tÿpëẤğ倪İЂҰक्र्तिृまẤğ倪İนั้ढूँ]",
|
819
|
+
"useListInstead": "[RPu0E][นั้Üsë list[T] tø ïñðïçætë æ list tÿpë ør T1 | T2 tø ïñðïçætë æ union tÿpëẤğ倪İЂҰक्र्तिृまẤğ倪İЂҰक्र्तिृまนั้ढूँ]",
|
820
|
+
"useTupleInstead": "[jaFqC][นั้Üsë tuple[T1, ..., Tn] tø ïñðïçætë æ tuple tÿpë ør T1 | T2 tø ïñðïçætë æ union tÿpëẤğ倪İЂҰक्र्तिृまẤğ倪İЂҰक्र्तिृまẤğ倪İЂนั้ढूँ]",
|
821
|
+
"useTypeInstead": "[Zig8D][นั้Üsë type[T] ïñstëæðẤğ倪İЂҰक्นั้ढूँ]",
|
822
822
|
"varianceMismatchForClass": "[fqhIl][นั้Værïæñçë øf tÿpë ærgµmëñt \"{tÿpëVærÑæmë}\" ïs ïñçømpætïþlë wïth þæsë çlæss \"{çlæssÑæmë}\"Ấğ倪İЂҰक्र्तिृまẤğ倪İЂҰक्र्तिृまẤğ倪İЂҰक्นั้ढूँ]",
|
823
823
|
"varianceMismatchForTypeAlias": "[YSiVx][นั้Værïæñçë øf tÿpë ærgµmëñt \"{tÿpëVærÑæmë}\" ïs ïñçømpætïþlë wïth \"{tÿpëÆlïæsPæræm}\"Ấğ倪İЂҰक्र्तिृまẤğ倪İЂҰक्र्तिृまẤğ倪İนั้ढूँ]"
|
824
824
|
},
|
@@ -815,10 +815,10 @@
|
|
815
815
|
"unhashableType": "Тип \"{type}\" не является хэшируемым",
|
816
816
|
"uninitializedAbstractVariable": "Переменная экземпляра \"{name}\" определена в абстрактном базовом классе \"{classType}\", но не инициализирована",
|
817
817
|
"unreachableExcept": "\"{exceptionType}\" является подклассом \"{parentType}\"",
|
818
|
-
"useDictInstead": "
|
819
|
-
"useListInstead": "
|
820
|
-
"useTupleInstead": "
|
821
|
-
"useTypeInstead": "
|
818
|
+
"useDictInstead": "Use dict[T1, T2] to indicate a dictionary type",
|
819
|
+
"useListInstead": "Use list[T] to indicate a list type or T1 | T2 to indicate a union type",
|
820
|
+
"useTupleInstead": "Use tuple[T1, ..., Tn] to indicate a tuple type or T1 | T2 to indicate a union type",
|
821
|
+
"useTypeInstead": "Use type[T] instead",
|
822
822
|
"varianceMismatchForClass": "Вариант аргумента типа \"{typeVarName}\" несовместим с базовым классом \"{className}\"",
|
823
823
|
"varianceMismatchForTypeAlias": "Отклонение аргумента типа \"{typeVarName}\" несовместимо с \"{typeAliasParam}\""
|
824
824
|
},
|
@@ -815,10 +815,10 @@
|
|
815
815
|
"unhashableType": "\"{type}\" türü karmalanabilir değil",
|
816
816
|
"uninitializedAbstractVariable": "\"{name}\" örnek değişkeni, \"{classType}\" soyut temel sınıfında tanımlandı ancak başlatılmadı",
|
817
817
|
"unreachableExcept": "\"{exceptionType}\", \"{parentType}\" üst öğesinin bir alt sınıfı",
|
818
|
-
"useDictInstead": "
|
819
|
-
"useListInstead": "Use
|
820
|
-
"useTupleInstead": "Use tuple[T1, ..., Tn] to indicate a tuple type or
|
821
|
-
"useTypeInstead": "
|
818
|
+
"useDictInstead": "Use dict[T1, T2] to indicate a dictionary type",
|
819
|
+
"useListInstead": "Use list[T] to indicate a list type or T1 | T2 to indicate a union type",
|
820
|
+
"useTupleInstead": "Use tuple[T1, ..., Tn] to indicate a tuple type or T1 | T2 to indicate a union type",
|
821
|
+
"useTypeInstead": "Use type[T] instead",
|
822
822
|
"varianceMismatchForClass": "\"{typeVarName}\" tür bağımsız değişkeni \"{className}\" taban sınıfıyla uyumsuz",
|
823
823
|
"varianceMismatchForTypeAlias": "\"{typeVarName}\" tür bağımsız değişkeninin varyansı, \"{typeAliasParam}\" ile uyumsuz"
|
824
824
|
},
|
@@ -815,10 +815,10 @@
|
|
815
815
|
"unhashableType": "类型“{type}”不可哈希",
|
816
816
|
"uninitializedAbstractVariable": "实例变量“{name}”在抽象基类“{classType}”中定义,但未初始化",
|
817
817
|
"unreachableExcept": "“{exceptionType}”是“{parentType}”的子类",
|
818
|
-
"useDictInstead": "
|
819
|
-
"useListInstead": "
|
820
|
-
"useTupleInstead": "
|
821
|
-
"useTypeInstead": "
|
818
|
+
"useDictInstead": "Use dict[T1, T2] to indicate a dictionary type",
|
819
|
+
"useListInstead": "Use list[T] to indicate a list type or T1 | T2 to indicate a union type",
|
820
|
+
"useTupleInstead": "Use tuple[T1, ..., Tn] to indicate a tuple type or T1 | T2 to indicate a union type",
|
821
|
+
"useTypeInstead": "Use type[T] instead",
|
822
822
|
"varianceMismatchForClass": "类型参数\"{typeVarName}\"的差异与基类\"{className}\"不兼容",
|
823
823
|
"varianceMismatchForTypeAlias": "类型参数\"{typeVarName}\"的差异与\"{typeAliasParam}\"不兼容"
|
824
824
|
},
|
@@ -815,10 +815,10 @@
|
|
815
815
|
"unhashableType": "型別 \"{type}\" 無法雜湊",
|
816
816
|
"uninitializedAbstractVariable": "執行個體變數 \"{name}\" 在抽象基底類別 \"{classType}\" 中定義,但未初始化",
|
817
817
|
"unreachableExcept": "\"{exceptionType}\" 是 \"{parentType}\" 的子類別",
|
818
|
-
"useDictInstead": "
|
819
|
-
"useListInstead": "
|
820
|
-
"useTupleInstead": "
|
821
|
-
"useTypeInstead": "
|
818
|
+
"useDictInstead": "Use dict[T1, T2] to indicate a dictionary type",
|
819
|
+
"useListInstead": "Use list[T] to indicate a list type or T1 | T2 to indicate a union type",
|
820
|
+
"useTupleInstead": "Use tuple[T1, ..., Tn] to indicate a tuple type or T1 | T2 to indicate a union type",
|
821
|
+
"useTypeInstead": "Use type[T] instead",
|
822
822
|
"varianceMismatchForClass": "型別引數 \"{typeVarName}\" 的變異數與基底類別 \"{className}\" 不相容",
|
823
823
|
"varianceMismatchForTypeAlias": "型別引數 \"{typeVarName}\" 的變異數與 \"{typeAliasParam}\" 不相容"
|
824
824
|
},
|
package/dist/parser/parser.js
CHANGED
@@ -3015,6 +3015,7 @@ class Parser {
|
|
3015
3015
|
_parseArgList() {
|
3016
3016
|
const argList = [];
|
3017
3017
|
let sawKeywordArg = false;
|
3018
|
+
let sawUnpackedKeywordArg = false;
|
3018
3019
|
let trailingComma = false;
|
3019
3020
|
while (true) {
|
3020
3021
|
const nextTokenType = this._peekTokenType();
|
@@ -3028,8 +3029,16 @@ class Parser {
|
|
3028
3029
|
if (arg.d.name) {
|
3029
3030
|
sawKeywordArg = true;
|
3030
3031
|
}
|
3031
|
-
else
|
3032
|
-
|
3032
|
+
else {
|
3033
|
+
if (sawKeywordArg && arg.d.argCategory === 0 /* ArgCategory.Simple */) {
|
3034
|
+
this._addSyntaxError(localize_1.LocMessage.positionArgAfterNamedArg(), arg);
|
3035
|
+
}
|
3036
|
+
if (sawUnpackedKeywordArg && arg.d.argCategory !== 2 /* ArgCategory.UnpackedDictionary */) {
|
3037
|
+
this._addSyntaxError(localize_1.LocMessage.positionArgAfterUnpackedDictArg(), arg);
|
3038
|
+
}
|
3039
|
+
}
|
3040
|
+
if (arg.d.argCategory === 2 /* ArgCategory.UnpackedDictionary */) {
|
3041
|
+
sawUnpackedKeywordArg = true;
|
3033
3042
|
}
|
3034
3043
|
argList.push(arg);
|
3035
3044
|
if (!this._consumeTokenIfType(12 /* TokenType.Comma */)) {
|
@@ -3890,7 +3899,8 @@ class Parser {
|
|
3890
3899
|
}
|
3891
3900
|
else {
|
3892
3901
|
const stringToken = stringNode.d.strings[0].d.token;
|
3893
|
-
const stringValue = StringTokenUtils.getUnescapedString(stringNode.d.strings[0].d.token
|
3902
|
+
const stringValue = StringTokenUtils.getUnescapedString(stringNode.d.strings[0].d.token,
|
3903
|
+
/* elideCrlf */ false);
|
3894
3904
|
const unescapedString = stringValue.value;
|
3895
3905
|
const tokenOffset = stringToken.start;
|
3896
3906
|
const prefixLength = stringToken.prefixLength + stringToken.quoteMarkLength;
|