'mypy in vscode consumes too much memory

recently I observed VScode is using an insane amount of memory and after some debugging, I realized it was caused by mypy. Basically, whenever I opened a python file, mypy launched a python process which quickly increases to more than 20G. The issue will go away only if I turned off mypy linting in vscode.

The only related config is this in workspace config file:

"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": [],

VScode version:1.66.2 Python: 3.8 Mypy: 0.910



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source