Skip to content

pylint errors stay around after deleting code file #1235

@bersbersbers

Description

@bersbersbers

Environment data

  • VS Code version: 1.21.1
  • Extension version: 2018.2.1
  • OS and version: Microsoft Windows [Version 10.0.16299.309]
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): dont know
  • Relevant/affected Python packages and their versions: pylint--version
    pylint 1.8.3,
    astroid 1.6.2
    Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)]

Actual behavior

After deleting bug.py, pylint errors for bug.py stay around.

Expected behavior

After deleting bug.py, pylint errors for bug.py are discarded. (This works for .cpp files, for example.)

Steps to reproduce:

  1. Create bug.py
  2. Write anything that raises a pylint error ("bug.py" is good, yields "E0602: Undefined variable 'bug'")
  3. Delete bug.py

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

nothing

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

Upon deleting bug.py:


mainThreadExtensionService.ts:44 TypeError: Cannot read property 'document' of undefined
	at disposables.push.documentManager.onDidChangeActiveTextEditor (C:\Users\Username\.vscode\extensions\ms-python.python-2018.2.1\out\client\interpreter\interpreterService.js:54:91)
	at e.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:88:992)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:665:650
	at e.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:88:992)
	at e.$acceptDocumentsAndEditorsDelta (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:663:757)
	at e._doInvokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:587:832)
	at e._invokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:587:550)
	at e._receiveRequest (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:586:658)
	at e._receiveOneMessage (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:586:427)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:585:494
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:44
e._doInvokeHandler @ rpcProtocol.ts:174
e._invokeHandler @ rpcProtocol.ts:159
e._receiveRequest @ rpcProtocol.ts:108
e._receiveOneMessage @ rpcProtocol.ts:90
(anonymous) @ rpcProtocol.ts:33
(anonymous) @ rpcProtocol.ts:213
e.fire @ event.ts:142
(anonymous) @ ipc.net.ts:81
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-lintingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions