Button "Clear Notification" for showErrorDialog shows the error anyway · Issue #18553 · microsoft/vscode-python (original) (raw)
Issue Type: Bug
Behaviour
Expected vs. Actual
When having a linter error, the Output window and the error are shown regardless if I click View Error or Clear Notification, whereas I would expect the error not to be shown if I dismiss the notification.
Steps to reproduce:
- Having a linter error trigger the
showErrorDialog
popup dialog, and dismiss it by pressing the cross (X) button.
Screenshot
Checking the action for the showErrorMessage
would fix the issue:
// src/client/linters/errorHandlers/standard.ts
private async displayLinterError(linterId: LinterId) {
const message = There was an error in running the linter '${linterId}'
;
const appShell = this.serviceContainer.get(IApplicationShell);
const action = await appShell.showErrorMessage(message, 'View Errors');
const outputChannel = this.serviceContainer.get(IOutputChannel, STANDARD_OUTPUT_CHANNEL);
if (typeof action !== 'undefined') {
outputChannel.show();
}
}
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.10.0
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Pyenv
- Value of the
python.languageServer
setting: Pylance User Settings
defaultLS: {"defaultLSType":"Pylance"}
downloadLanguageServer: true
envFile: "<placeholder>"
venvPath: "<placeholder>"
venvFolders: "<placeholder>"
condaPath: "<placeholder>"
pipenvPath: "<placeholder>"
poetryPath: "<placeholder>"
languageServer: "Pylance"
linting
• enabled: false
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: true
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: true
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: true
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: true
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: true
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: true
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: true
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"
sortImports
• args: "<placeholder>"
• path: "<placeholder>"
formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "black"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"
testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: false
• pytestArgs: "<placeholder>"
• pytestEnabled: true
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true
terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"
experiments
• enabled: true
• optInto: []
• optOutFrom: []
insidersChannel: "off"
tensorBoard
• logDirectory: "<placeholder>"
Extension version: 2022.0.1814523869
VS Code version: Code 1.64.2 (f80445acd5a3dadef24aa209168452a3d97cc326, 2022-02-09T22:00:58.347Z)
OS version: Darwin x64 19.6.0
Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz (20 x 3700) |
GPU Status | 2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled |
Load (avg) | 1, 1, 2 |
Memory (System) | 64.00GB (38.99GB free) |
Process Argv | --crash-reporter-id 4a08d060-341e-4db8-bf8b-bc34d339485a |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
pythonvspyl392:30425749
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstartedc:30433508
vsclayoutctrc:30437038
vsrem710cf:30416617
vscop841cf:30438916
dsvsc008:30440022
vsbas813:30436447
vscscmwlcmt:30438805
helix:30440343
vscaat:30438848