A Visual Studio Code extension with support for the flake8
linter. The extension ships with flake8=5.0.4
.
Note:
- This extension is supported for all actively supported versions of the
python
language (i.e., python >= 3.7). - The bundled
flake8
is only used if there is no installed version offlake8
found in the selectedpython
environment. - Minimum supported version of
flake8
is5.0.0
.
Once installed in Visual Studio Code, flake8 will be automatically executed when you open a Python file.
If you want to disable flake8, you can disable this extension per workspace in Visual Studio Code.
Settings | Default | Description |
---|---|---|
flake8.args | [] |
Custom arguments passed to flake8 . E.g "flake8.args" = ["--rcfile=<file>"] |
flake8.severity | { "convention": "Information", "error": "Error", "fatal": "Error", "refactor": "Hint", "warning": "Warning", "info": "Information" } |
Controls mapping of severity from flake8 to VS Code severity when displaying in the problems window. You can override specific flake8 error codes { "convention": "Information", "error": "Error", "fatal": "Error", "refactor": "Hint", "warning": "Warning", "W0611": "Error", "undefined-variable": "Warning" } |
flake8.logLevel | error |
Sets the tracing level for the extension. |
flake8.path | [] |
Setting to provide custom flake8 executable. This will slow down linting, since we will have to run flake8 executable every time or file save or open. Example 1: ["~/global_env/flake8"] Example 2: ["conda", "run", "-n", "lint_env", "python", "-m", "flake8"] |
flake8.interpreter | [] |
Path to a python interpreter to use to run the linter server. |
flake8.importStrategy | useBundled |
Setting to choose where to load flake8 from. useBundled picks flake8 bundled with the extension. fromEnvironment uses flake8 available in the environment. |
flake8.showNotification | off |
Setting to control when a notification is shown. |
Command | Description |
---|---|
Flake8: Restart Server | Force re-start the linter server. |