pylint checks with pylance enabled
See original GitHub issueDunno if this should be a bug report or feature request…
First of all, I just installed and used pylance as the language server for my vscode and it is indeed SUPER! thanks.
However, I had setup plenty of custom python.linting.pylintArgs
to check in my code, for example on my most occuring bugs are trailing-comma-tuple
and more, after switching python.languageServer
to "Pylance"
these checks stopped being checked for.
As said, I would consider this a feature request that pylance should support these checks.
Another example is, unused variables, in pylint I got unused variables error for unused arguments in function signatures, while pylance only checks for code blocks, i.e.;
def function(a, b):
c = 42
return a
pylint would complain about b
and c
being unused, while pylance only complains about c
.
Once again, super cool linter!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:19 (4 by maintainers)
I found out about pylance just a couple of days ago and enabled it. It is very nice, but I too lost all my linting from pylint. I found this issue after searching for a solution.
After some more trial, I seem to have been able to re-enable pylint without changing the language server (i.e. I get both pylance and pylint warnings). I did this by explicitly enabling pylint in my settings.json file. So my settings.json now include, among other lines:
I had to make the change manually in settings.json, just checking the setting “Python > Linting: Pylint Enabled” in the graphical settings meny in VSCode was not enough (that was marked as enabled the whole time). Why this works I don’t really know, but it seems to work for me at least. Also, the order of the lines in settings.json doesn’t seem to matter. I have tried this on both a Linux and a Windows machine.
I hope this can help someone else.
Windows machine config: VSCode: 1.49.2 Python: 3.8.5 Pylint: 2.6.0 Python extension: 2020.9.112786 Pylance extension: 2020.9.7
This is still a problem. Pylance does almost no linting in comparison to pylint. The linter enabled in the settings should not be silently disabled when enabled in the settings via the user interface. I have yet to try explicitly setting it in the json settings but it shouldn’t be necessary.
If I could use pylance and vscode at work and not get hounded during code review for code formatting issues that the linter would have caught, that’d be great.