..
Vscode python check wrong method parameters
Recently I switched from pycharm to cursor which is vscode based. However, I found it cannot find errors if I pass wrong parameters to a method.
For example, I have a method like this:
def add(a, b):
return a + b
And then I call this method like this:
add(1)
In pycharm, it will warn me that there is an unexpected argument. However, in cursor, it won’t.
After some research, I found the setting python.analysis.typeCheckingMode
in vscode. The default value in cursor is none
, if it is set to basic
, it will check wrong parameters and wrong method syntax.
By the way, I’m surprised that ruff check cannot find this error or I missed something?