Skip to content

Commit

Permalink
Changed pythonPlatform to accept a value of "All" in which case no pa…
Browse files Browse the repository at this point in the history
…rticular platform will be used over the others.
  • Loading branch information
msfterictraut committed Jan 4, 2021
1 parent 2fd7846 commit 602aefa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function evaluateStaticBoolExpression(
// Handle the special case of "sys.platform != 'X'"
const comparisonPlatform = node.rightExpression.strings.map((s) => s.value).join('');
const expectedPlatformName = _getExpectedPlatformNameFromPlatform(execEnv);
return _evaluateStringBinaryOperation(node.operator, expectedPlatformName || '', comparisonPlatform);
return _evaluateStringBinaryOperation(node.operator, expectedPlatformName, comparisonPlatform);
} else if (
_isOsNameInfoExpression(node.leftExpression) &&
node.rightExpression.nodeType === ParseNodeType.StringList
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-pyright/schemas/pyrightconfig.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
"examples": [
"Linux"
],
"pattern": "^(Linux|Windows|Darwin)$"
"pattern": "^(Linux|Windows|Darwin|All)$"
},
"venvPath": {
"$id": "#/properties/venvPath",
Expand Down Expand Up @@ -497,7 +497,7 @@
"examples": [
"Linux"
],
"pattern": "^(Linux|Windows|Darwin)$"
"pattern": "^(Linux|Windows|Darwin|All)$"
},
"venv": {
"$id": "#/properties/venv",
Expand Down

0 comments on commit 602aefa

Please sign in to comment.