How to Update Flake8 Settings in VSCode Following Deprecation Warning

1.9k Views Asked by At

I've always been modifying my Flake8 settings through a file named 'settings.json' located inside the .vscode folder. This file is automatically generated when you choose a linter.

However, for the past few weeks, I've been receiving a warning from VSCode that says: "This setting will soon be deprecated. Please use the Flake8 extension. Learn more here: https://aka.ms/AAlgvkb ."

From the provided link, I understand that Flake8 should be used as an extension, but it doesn't explain how to modify settings in another way.

Here's an example of my 'settings.json' file:

{
    "python.linting.flake8Enabled": true,
    "python.linting.enabled": true,
    "python.linting.flake8Args": [
        "--max-line-length=120"
    ]
}
1

There are 1 best solutions below

0
JialeDu On BEST ANSWER

You can use this setting, more configuration information here.

https://github.com/microsoft/vscode-flake8#settings

    "flake8.args": [
        "--max-line-length=120"
    ],

enter image description here