mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Changed python.analysis.logLevel to use "Information" rather than "Info" for consistency with Python extension.
This commit is contained in:
parent
e2a7247c61
commit
006f5d60d1
@ -20,7 +20,7 @@ The Pyright VS Code extension honors the following settings.
|
||||
|
||||
**python.analysis.extraPaths** [array of paths]: Paths to add to the default execution environment extra paths if there are no execution environments defined in the config file.
|
||||
|
||||
**python.analysis.logLevel** ["Error", "Warning", "Info", or "Trace"]: Level of logging for Output panel. The default value for this option is "Info".
|
||||
**python.analysis.logLevel** ["Error", "Warning", "Information", or "Trace"]: Level of logging for Output panel. The default value for this option is "Information".
|
||||
|
||||
**python.analysis.stubPath** [path]: Path to directory containing custom type stub files.
|
||||
|
||||
|
@ -2672,14 +2672,18 @@ export class Binder extends ParseTreeWalker {
|
||||
case 'error':
|
||||
diagnostic = this._addError(message, textRange);
|
||||
break;
|
||||
|
||||
case 'warning':
|
||||
diagnostic = this._addWarning(message, textRange);
|
||||
break;
|
||||
|
||||
case 'information':
|
||||
diagnostic = this._addInformation(message, textRange);
|
||||
break;
|
||||
|
||||
case 'none':
|
||||
break;
|
||||
|
||||
default:
|
||||
return assertNever(diagLevel, `${diagLevel} is not expected`);
|
||||
}
|
||||
|
@ -132,13 +132,17 @@ function _parseDiagLevel(value: string): DiagnosticLevel | undefined {
|
||||
case 'false':
|
||||
case 'none':
|
||||
return 'none';
|
||||
|
||||
case 'true':
|
||||
case 'error':
|
||||
return 'error';
|
||||
|
||||
case 'warning':
|
||||
return 'warning';
|
||||
|
||||
case 'information':
|
||||
return 'information';
|
||||
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
|
@ -25,10 +25,13 @@ export function convertLevelToCategory(level: DiagnosticLevel) {
|
||||
switch (level) {
|
||||
case 'error':
|
||||
return DiagnosticCategory.Error;
|
||||
|
||||
case 'warning':
|
||||
return DiagnosticCategory.Warning;
|
||||
|
||||
case 'information':
|
||||
return DiagnosticCategory.Information;
|
||||
|
||||
default:
|
||||
throw new Error(`${level} is not expected`);
|
||||
}
|
||||
|
@ -1049,19 +1049,19 @@ export abstract class LanguageServerBase implements LanguageServerInterface {
|
||||
return completions?.completionList;
|
||||
}
|
||||
|
||||
protected convertLogLevel(logLevel?: string): LogLevel {
|
||||
if (!logLevel) {
|
||||
protected convertLogLevel(logLevelValue?: string): LogLevel {
|
||||
if (!logLevelValue) {
|
||||
return LogLevel.Info;
|
||||
}
|
||||
|
||||
switch (logLevel.toLowerCase()) {
|
||||
switch (logLevelValue.toLowerCase()) {
|
||||
case 'error':
|
||||
return LogLevel.Error;
|
||||
|
||||
case 'warning':
|
||||
return LogLevel.Warn;
|
||||
|
||||
case 'info':
|
||||
case 'information':
|
||||
return LogLevel.Info;
|
||||
|
||||
case 'trace':
|
||||
|
@ -576,7 +576,7 @@
|
||||
"enum": [
|
||||
"Error",
|
||||
"Warning",
|
||||
"Info",
|
||||
"Information",
|
||||
"Trace"
|
||||
]
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user