@zzzen/pyright-internal 1.2.0-dev.20260830 → 1.2.0-dev.20260906
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/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/sourceFileInfo.d.ts +1 -0
- package/dist/analyzer/sourceFileInfo.js +3 -0
- package/dist/analyzer/sourceFileInfo.js.map +1 -1
- package/dist/common/extensibility.d.ts +1 -0
- package/dist/common/extensibility.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 +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.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 +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/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/hoverProvider.test.js +2 -2
- 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 +11 -0
- package/dist/tests/typeEvaluator1.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/typeServer/stubGenerator.js +32 -7
- package/dist/typeServer/stubGenerator.js.map +1 -1
- package/package.json +1 -1
|
@@ -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": "許可される \"*\" パラメーターは 1 つだけです",
|
|
154
154
|
"duplicateBaseClass": "重複する基底クラスは許可されていません",
|
|
@@ -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": "중복 기본 클래스는 허용되지 않습니다.",
|
|
@@ -145,10 +145,10 @@
|
|
|
145
145
|
"dictInAnnotation": "Wyrażenie słownika jest niedozwolone w wyrażeniu typu",
|
|
146
146
|
"dictKeyValuePairs": "Wpisy słownika muszą zawierać pary klucz/wartość",
|
|
147
147
|
"dictUnpackIsNotMapping": "Oczekiwano mapowania dla operatora rozpakowywania słownika",
|
|
148
|
-
"disjointBaseFunction": "
|
|
149
|
-
"disjointBaseIncompatible": "
|
|
150
|
-
"disjointBaseProtocol": "
|
|
151
|
-
"disjointBaseTypedDict": "
|
|
148
|
+
"disjointBaseFunction": "Nie można zastosować funkcji @disjoint_base do funkcji",
|
|
149
|
+
"disjointBaseIncompatible": "Klasy bazowe mają niezgodne rozłączne bazy: {bases}",
|
|
150
|
+
"disjointBaseProtocol": "Nie można zastosować funkcji @disjoint_base do klasy Protocol",
|
|
151
|
+
"disjointBaseTypedDict": "Nie można zastosować funkcji @disjoint_base do klasy TypedDict",
|
|
152
152
|
"dunderAllSymbolNotPresent": "Nazwa „{name}” jest określona w wartości __all__, ale nie występuje w module",
|
|
153
153
|
"duplicateArgsParam": "Dozwolony tylko jeden parametr „*”",
|
|
154
154
|
"duplicateBaseClass": "Zduplikowana klasa bazowa jest niedozwolona",
|
|
@@ -145,10 +145,10 @@
|
|
|
145
145
|
"dictInAnnotation": "Expressão de dicionário não permitida na expressão de tipo",
|
|
146
146
|
"dictKeyValuePairs": "Entradas de dicionário devem conter pares chave/valor",
|
|
147
147
|
"dictUnpackIsNotMapping": "Mapeamento esperado para o operador de desempacotamento de dicionário",
|
|
148
|
-
"disjointBaseFunction": "@disjoint_base
|
|
149
|
-
"disjointBaseIncompatible": "
|
|
150
|
-
"disjointBaseProtocol": "@disjoint_base
|
|
151
|
-
"disjointBaseTypedDict": "@disjoint_base
|
|
148
|
+
"disjointBaseFunction": "@disjoint_base não pode ser aplicado a uma função",
|
|
149
|
+
"disjointBaseIncompatible": "As classes base têm bases disjuntas incompatíveis: {bases}",
|
|
150
|
+
"disjointBaseProtocol": "@disjoint_base não pode ser aplicado a uma classe Protocolo",
|
|
151
|
+
"disjointBaseTypedDict": "@disjoint_base não pode ser aplicado a uma classe TypedDict",
|
|
152
152
|
"dunderAllSymbolNotPresent": "\"{name}\" está especificado no __all__ mas não está presente no módulo",
|
|
153
153
|
"duplicateArgsParam": "Somente um parâmetro \"*\" permitido",
|
|
154
154
|
"duplicateBaseClass": "Classe base duplicada não permitida",
|
|
@@ -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": "Дублирование базового класса не допускается",
|
|
@@ -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",
|
|
@@ -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": "不允许重复的基类",
|
|
@@ -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": "不允許重複的基底類別",
|
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)) {
|