I'm trying to check for issues in a script I'm working on "python_record.py". If I run pylint python_record.py in a terminal I get a long output with multiple errors.
But when I run pylint through VSCode I don't get anything. I've enabled linting, and selected run pylint and it's giving me nothing. The following is my settings.json:
{
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe",
"git.confirmSync": false,
"python.linting.enabled": true,
"window.zoomLevel": -2,
"python.pythonPath": "C:\\Users\\becky\\AppData\\Local\\Programs\\Python\\Python38-
32\\python.exe",
"files.autoSave": "off",
"terminal.integrated.automationShell.linux": "",
"python.linting.pylintEnabled": true,
"python.linting.pylintUseMinimalCheckers": false,
"terminal.integrated.env.linux": {
},
"terminal.integrated.automationShell.windows": "",
"python.autoComplete.extraPaths": [
],
"workbench.editorAssociations": [
{
"viewType": "jupyter.notebook.ipynb",
"filenamePattern": "*.ipynb"
}
]
}
I'm not fixed on any particularly fancy settings so happy to change the settings.json around completely, I just want my default terminal to be bash and linting to run properly (particularly on save).
Please let me know if you can help!
Thanks!!
Edit:
If I run pip show pylint
in my VSCode terminal, the following is returned:
For anyone else struggling with this, I resolved it by reinstalling VSCode and starting from scratch as follows:
pip install pylint
in my terminalpylint --generate-rcfile | Out-File -Encoding utf8 .pylintrc
in my terminal from the folder where my scripts are (not sure if I'll have to do this every time!)(The locations of the folders you need to delete may be different I had to dig about a bit for mine. I also couldn't see them in my usual file explorer so I had to go through the command line - I use a bash emulator)
This website was helpful: