@zzzen/pyright-internal 1.2.0-dev.20260830 → 1.2.0-dev.20260913
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/checker.d.ts +2 -1
- package/dist/analyzer/checker.js +78 -2
- package/dist/analyzer/checker.js.map +1 -1
- package/dist/analyzer/constraintSolver.js +10 -2
- package/dist/analyzer/constraintSolver.js.map +1 -1
- package/dist/analyzer/constructors.js +7 -18
- package/dist/analyzer/constructors.js.map +1 -1
- package/dist/analyzer/decorators.js +45 -2
- package/dist/analyzer/decorators.js.map +1 -1
- package/dist/analyzer/parseTreeUtils.js +12 -13
- package/dist/analyzer/parseTreeUtils.js.map +1 -1
- package/dist/analyzer/service.d.ts +3 -1
- package/dist/analyzer/service.js +19 -10
- package/dist/analyzer/service.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +56 -379
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/common/fileSystem.d.ts +1 -0
- package/dist/common/fileSystem.js.map +1 -1
- package/dist/common/realFileSystem.d.ts +1 -0
- package/dist/common/realFileSystem.js +12 -0
- package/dist/common/realFileSystem.js.map +1 -1
- package/dist/fileSystemMapping.d.ts +1 -1
- package/dist/fileSystemMapping.js +3 -0
- package/dist/fileSystemMapping.js.map +1 -1
- package/dist/languageService/completionProvider.d.ts +2 -1
- package/dist/languageService/completionProvider.js +4 -1
- package/dist/languageService/completionProvider.js.map +1 -1
- package/dist/languageService/fileWatcherDynamicFeature.d.ts +6 -4
- package/dist/languageService/fileWatcherDynamicFeature.js +19 -15
- package/dist/languageService/fileWatcherDynamicFeature.js.map +1 -1
- package/dist/languageService/hoverProvider.d.ts +1 -1
- package/dist/languageService/hoverProvider.js +13 -8
- package/dist/languageService/hoverProvider.js.map +1 -1
- package/dist/languageService/tooltipUtils.d.ts +2 -1
- package/dist/languageService/tooltipUtils.js +15 -17
- package/dist/languageService/tooltipUtils.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 +5 -4
- package/dist/localization/package.nls.de.json +5 -4
- package/dist/localization/package.nls.en-us.json +1 -0
- package/dist/localization/package.nls.es.json +5 -4
- package/dist/localization/package.nls.fr.json +5 -4
- package/dist/localization/package.nls.it.json +5 -4
- package/dist/localization/package.nls.ja.json +5 -4
- package/dist/localization/package.nls.ko.json +5 -4
- package/dist/localization/package.nls.pl.json +5 -4
- package/dist/localization/package.nls.pt-br.json +5 -4
- package/dist/localization/package.nls.qps-ploc.json +1 -0
- package/dist/localization/package.nls.ru.json +5 -4
- package/dist/localization/package.nls.tr.json +5 -4
- package/dist/localization/package.nls.zh-cn.json +5 -4
- package/dist/localization/package.nls.zh-tw.json +5 -4
- package/dist/parser/parser.js +7 -1
- package/dist/parser/parser.js.map +1 -1
- package/dist/parser/tokenizer.js +3 -5
- package/dist/parser/tokenizer.js.map +1 -1
- package/dist/readonlyAugmentedFileSystem.d.ts +1 -0
- package/dist/readonlyAugmentedFileSystem.js +3 -0
- package/dist/readonlyAugmentedFileSystem.js.map +1 -1
- package/dist/tests/checker.test.js +8 -0
- package/dist/tests/checker.test.js.map +1 -1
- package/dist/tests/fileSystemMapping.test.js +3 -0
- package/dist/tests/fileSystemMapping.test.js.map +1 -1
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +5 -5
- package/dist/tests/fourslash/hover.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.plainText.fourslash.js +1 -1
- package/dist/tests/harness/vfs/filesystem.d.ts +1 -0
- package/dist/tests/harness/vfs/filesystem.js +3 -0
- package/dist/tests/harness/vfs/filesystem.js.map +1 -1
- package/dist/tests/hoverProvider.test.js +2 -2
- package/dist/tests/importResolver.test.js +5 -0
- package/dist/tests/importResolver.test.js.map +1 -1
- package/dist/tests/mypyPrimerAnalysis.test.d.ts +1 -0
- package/dist/tests/mypyPrimerAnalysis.test.js +633 -0
- package/dist/tests/mypyPrimerAnalysis.test.js.map +1 -0
- package/dist/tests/parseTreeUtils.test.js +41 -0
- package/dist/tests/parseTreeUtils.test.js.map +1 -1
- package/dist/tests/service.test.js +46 -0
- package/dist/tests/service.test.js.map +1 -1
- package/dist/tests/typeEvaluator1.test.js +13 -2
- package/dist/tests/typeEvaluator1.test.js.map +1 -1
- package/dist/tests/typeEvaluator6.test.js +155 -3
- package/dist/tests/typeEvaluator6.test.js.map +1 -1
- package/dist/tests/typeServer/stubGenerator.test.d.ts +1 -0
- package/dist/tests/typeServer/stubGenerator.test.js +73 -0
- package/dist/tests/typeServer/stubGenerator.test.js.map +1 -0
- package/dist/tests/typeUtils.test.js +15 -0
- package/dist/tests/typeUtils.test.js.map +1 -1
- package/dist/typeServer/stubGenerator.js +32 -7
- package/dist/typeServer/stubGenerator.js.map +1 -1
- package/dist/typeServer/typeServerFileSystem.d.ts +1 -0
- package/dist/typeServer/typeServerFileSystem.js +3 -0
- package/dist/typeServer/typeServerFileSystem.js.map +1 -1
- package/dist/typeServer/virtualFileOverlayFileSystem.d.ts +1 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.js +3 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.js.map +1 -1
- package/package.json +1 -1
|
@@ -145,10 +145,10 @@
|
|
|
145
145
|
"dictInAnnotation": "Tür ifadesinde sözlük ifadesi kullanılamaz",
|
|
146
146
|
"dictKeyValuePairs": "Sözlük girdileri anahtar/değer çiftleri içermelidir",
|
|
147
147
|
"dictUnpackIsNotMapping": "Sözlük açma işleci için eşleme bekleniyordu",
|
|
148
|
-
"disjointBaseFunction": "@disjoint_base
|
|
149
|
-
"disjointBaseIncompatible": "
|
|
150
|
-
"disjointBaseProtocol": "@disjoint_base
|
|
151
|
-
"disjointBaseTypedDict": "@disjoint_base
|
|
148
|
+
"disjointBaseFunction": "@disjoint_base bir işleve uygulanamaz",
|
|
149
|
+
"disjointBaseIncompatible": "Temel sınıfların uyumsuz ayrık tabanları var: {bases}",
|
|
150
|
+
"disjointBaseProtocol": "@disjoint_base bir Protocol sınıfına uygulanamaz",
|
|
151
|
+
"disjointBaseTypedDict": "@disjoint_base bir TypedDict sınıfına uygulanamaz",
|
|
152
152
|
"dunderAllSymbolNotPresent": "\"{name}\" __all__ ile belirtildi ancak modülde yok",
|
|
153
153
|
"duplicateArgsParam": "Yalnızca bir \"*\" parametresi kullanılabilir",
|
|
154
154
|
"duplicateBaseClass": "Yinelenen temel sınıfa izin verilmiyor",
|
|
@@ -672,6 +672,7 @@
|
|
|
672
672
|
"variadicTypeParamTooManyClass": "Genel sınıf en fazla bir TypeVarTuple tür parametresine sahip olabilir ancak birden fazlası {names}) alındı",
|
|
673
673
|
"walrusIllegal": "\":=\" işleci için Python 3.8 veya daha yeni bir sürümü gerekiyor",
|
|
674
674
|
"walrusNotAllowed": "Çevreleyen parantezler olmadan bu bağlamda \":=\" işlecine izin verilmiyor",
|
|
675
|
+
"walrusNotAllowedInComprehension": "\":=\" işleci, bir comprehension yinelemeli ifadesi içinde kullanılamaz",
|
|
675
676
|
"wildcardInFunction": "Wildcard import not allowed within a class or function",
|
|
676
677
|
"wildcardLibraryImport": "Wildcard import from a library not allowed",
|
|
677
678
|
"wildcardPatternTypePartiallyUnknown": "Joker karakter deseni tarafından yakalanan tür kısmen bilinmiyor",
|
|
@@ -145,10 +145,10 @@
|
|
|
145
145
|
"dictInAnnotation": "类型表达式中不允许使用字典表达式",
|
|
146
146
|
"dictKeyValuePairs": "字典条目必须包含键/值对",
|
|
147
147
|
"dictUnpackIsNotMapping": "字典解包运算符的预期映射",
|
|
148
|
-
"disjointBaseFunction": "@disjoint_base
|
|
149
|
-
"disjointBaseIncompatible": "
|
|
150
|
-
"disjointBaseProtocol": "@disjoint_base
|
|
151
|
-
"disjointBaseTypedDict": "@disjoint_base
|
|
148
|
+
"disjointBaseFunction": "@disjoint_base 不能应用于函数",
|
|
149
|
+
"disjointBaseIncompatible": "基类具有不兼容的互斥基数: {bases}",
|
|
150
|
+
"disjointBaseProtocol": "@disjoint_base 不能应用于 Protocol 类",
|
|
151
|
+
"disjointBaseTypedDict": "@disjoint_base 不能应用于 TypedDict 类",
|
|
152
152
|
"dunderAllSymbolNotPresent": "\"{name}\"已在__all__中指定,但在模块中不存在",
|
|
153
153
|
"duplicateArgsParam": "只允许一个 \"*\" 参数",
|
|
154
154
|
"duplicateBaseClass": "不允许重复的基类",
|
|
@@ -672,6 +672,7 @@
|
|
|
672
672
|
"variadicTypeParamTooManyClass": "泛型类最多可以有一个 TypeVarTuple 类型参数,但收到多个 ({names})",
|
|
673
673
|
"walrusIllegal": "运算符 \":=\" 需要 Python 3.8 或更高版本",
|
|
674
674
|
"walrusNotAllowed": "此上下文中不允许使用运算符 \":=\",且不带括号",
|
|
675
|
+
"walrusNotAllowedInComprehension": "在推导可迭代表达式中不允许使用操作符 \":=\"",
|
|
675
676
|
"wildcardInFunction": "类或函数中不允许使用通配符 import",
|
|
676
677
|
"wildcardLibraryImport": "不允许从库中 import 通配符",
|
|
677
678
|
"wildcardPatternTypePartiallyUnknown": "通配符模式捕获的类型部分未知",
|
|
@@ -145,10 +145,10 @@
|
|
|
145
145
|
"dictInAnnotation": "類型運算式中不允許字典運算式",
|
|
146
146
|
"dictKeyValuePairs": "字典項目必須包含金鑰/值組",
|
|
147
147
|
"dictUnpackIsNotMapping": "預期為字典解壓縮運算子的對應",
|
|
148
|
-
"disjointBaseFunction": "@disjoint_base
|
|
149
|
-
"disjointBaseIncompatible": "
|
|
150
|
-
"disjointBaseProtocol": "@disjoint_base
|
|
151
|
-
"disjointBaseTypedDict": "@disjoint_base
|
|
148
|
+
"disjointBaseFunction": "@disjoint_base 無法套用於函式",
|
|
149
|
+
"disjointBaseIncompatible": "基礎映像類別具有不相容的不相鄰基礎映像: {bases}",
|
|
150
|
+
"disjointBaseProtocol": "@disjoint_base 無法套用至 Protocol 類別",
|
|
151
|
+
"disjointBaseTypedDict": "@disjoint_base 無法套用至 TypedDict 類別",
|
|
152
152
|
"dunderAllSymbolNotPresent": "\"{name}\" 已在 __all__ 中指定,但在模組中不存在",
|
|
153
153
|
"duplicateArgsParam": "只允許一個 \"*\" 參數",
|
|
154
154
|
"duplicateBaseClass": "不允許重複的基底類別",
|
|
@@ -672,6 +672,7 @@
|
|
|
672
672
|
"variadicTypeParamTooManyClass": "一般類別最多只能有一個 TypeVarTuple 類型參數,但收到多個 ({names})",
|
|
673
673
|
"walrusIllegal": "運算子 \":=\" 需要 Python 3.8 或更新版本",
|
|
674
674
|
"walrusNotAllowed": "此內容中不允許未使用括弧括住的運算子 \":=\"",
|
|
675
|
+
"walrusNotAllowedInComprehension": "在理解可反覆運算的運算式內不允許使用運算子 \":=\"",
|
|
675
676
|
"wildcardInFunction": "類別或函式內不允許萬用字元 import",
|
|
676
677
|
"wildcardLibraryImport": "不允許從程式庫 import 萬用字元",
|
|
677
678
|
"wildcardPatternTypePartiallyUnknown": "萬用字元模式擷取的類型部分未知",
|
package/dist/parser/parser.js
CHANGED
|
@@ -2679,7 +2679,13 @@ class Parser {
|
|
|
2679
2679
|
if (!this._consumeTokenIfOperator(35 /* OperatorType.Walrus */)) {
|
|
2680
2680
|
return leftExpr;
|
|
2681
2681
|
}
|
|
2682
|
-
if (!this._assignmentExpressionsAllowed
|
|
2682
|
+
if (!this._assignmentExpressionsAllowed) {
|
|
2683
|
+
// Assignment expressions are disallowed anywhere within the iterable
|
|
2684
|
+
// expression of a comprehension's "for" clause, even if parenthesized.
|
|
2685
|
+
// This differs from the "requires surrounding parentheses" case below.
|
|
2686
|
+
this._addSyntaxError(localize_1.LocMessage.walrusNotAllowedInComprehension(), walrusToken);
|
|
2687
|
+
}
|
|
2688
|
+
else if (disallowAssignmentExpression) {
|
|
2683
2689
|
this._addSyntaxError(localize_1.LocMessage.walrusNotAllowed(), walrusToken);
|
|
2684
2690
|
}
|
|
2685
2691
|
if (pythonVersion_1.PythonVersion.isLessThan(this._getLanguageVersion(), pythonVersion_1.pythonVersion3_8)) {
|