E241 on Flake 8 is not displayed

Asked 2 years ago, Updated 2 years ago, 378 views

I'm currently trying to program Python in VSCode, and I'm installing Flake 8, but I can't see E241.E501 and E401 are displayed, but E241 is not displayed to cope with the habit of opening spaces unnecessarily.
Why does this happen?

running environment:
Flake 8 5.5.4.1/3.6.0
Python 3.8.3

python python3 vscode

2022-10-22 09:13

1 Answers

E241 is disabled by default.Several other rules are disabled by default because they are not accepted unanimously and are not required by PEP8.(Reference: Error codes)

You may want to add and enable E241 in extend-select.

To enable in the configuration file

Add the following to the configuration file (one of the following) as described in Configuration Locations:

 [flake8]
extend-select = E241

To enable with command-line options

flake8 --extend-select=E241

Run as .When running on a VSCode, the option setting is Python L Linting:Flake8Args.Add --extend-select=E241 to this.(Reference: Linting Python in Visual Studio Code)


2022-10-22 09:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.