I'm already using flake8 but it doesn't detect such kinds of error. Is there a way to make flake8 behave like that?
CodePudding user response:
Sorry, but it looks impossible.
In the mypy
, this function was provided by "check_untyped_defs=true"
. We can disabled it with this configuration in the settings.json:
"python.linting.mypyArgs": [
"--follow-imports=silent",
"--ignore-missing-imports",
"--show-column-numbers",
"--no-pretty",
"check_untyped_defs=false" //this line
],
And from the official docs of flake8, it only disabled these functions:
By default, Flake8 ignores E121, E123, E126, E226, E24, and E704.
But although you enable both of them, the flake8 still does not work.
So, it looks like the flake8 has not this feature.