Skip to content
This repository was archived by the owner on Apr 26, 2023. It is now read-only.

Commit 77e3eb3

Browse files
committed
New flake8 vscode extension
1 parent 32b9ee9 commit 77e3eb3

File tree

3 files changed

+30
-20
lines changed

3 files changed

+30
-20
lines changed

.flake8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ per-file-ignores=
2020
; Line too long
2121
; Naming conventions can't be controlled for external libraries
2222
; Argument names can't be controlled for external libraries
23-
typings/**: Q000,E704,E501,N8,A002
23+
; False positive Class level expression with elipsis
24+
typings/**: Q000,E704,E501,N8,A002,CCE002
2425
; PyQt methods
2526
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
2627
; McCabe max-complexity is also taken care of by Pylint and doesn't fail the build there

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"bungcip.better-toml",
55
"davidanson.vscode-markdownlint",
66
"eamodio.gitlens",
7+
"ms-python.flake8",
78
"ms-python.python",
89
"ms-python.vscode-pylance",
910
"ms-vscode.powershell",

.vscode/settings.json

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,33 @@
6161
"python.linting.pylintEnabled": true,
6262
"python.linting.pylintCategorySeverity.convention": "Warning",
6363
"python.linting.pylintCategorySeverity.refactor": "Warning",
64-
"python.linting.flake8Enabled": true,
65-
// builtins
66-
"python.linting.flake8CategorySeverity.A": "Warning",
67-
// mccabe & class attributes order
68-
"python.linting.flake8CategorySeverity.C": "Warning",
69-
// pycodestyles
70-
"python.linting.flake8CategorySeverity.E": "Warning",
71-
// Pyflakes
72-
"python.linting.flake8CategorySeverity.F": "Warning",
73-
// PEP8 Naming convention
74-
"python.linting.flake8CategorySeverity.N": "Warning",
75-
// Simplify
76-
"python.linting.flake8CategorySeverity.S": "Warning",
77-
// PYI
78-
"python.linting.flake8CategorySeverity.Y": "Warning",
79-
// Below doesn't work yet https://github.com/microsoft/vscode-python/issues/1438 & https://github.com/microsoft/vscode-python/issues/18261
80-
"python.linting.flake8CategorySeverity.CCE": "Warning",
81-
"python.linting.flake8CategorySeverity.SIM": "Warning",
82-
"python.linting.flake8CategorySeverity.SIM9": "Information",
64+
"flake8.severity": {
65+
"convention": "Warning",
66+
"error": "Error",
67+
"fatal": "Error",
68+
"refactor": "Warning",
69+
"warning": "Warning",
70+
"info": "Warning",
71+
// builtins
72+
"A": "Warning",
73+
// mccabe
74+
"C": "Warning",
75+
// class attributes order
76+
"CCE": "Warning",
77+
// pycodestyles
78+
"E": "Warning",
79+
"E9": "Error", // Runtime
80+
"W": "Warning",
81+
// Pyflakes
82+
"F": "Warning",
83+
// PEP8 Naming convention
84+
"N": "Warning",
85+
// Simplify
86+
"SIM": "Warning",
87+
"SIM9": "Information",
88+
// PYI
89+
"Y": "Warning",
90+
},
8391
// PyRight obsoletes mypy
8492
"python.linting.mypyEnabled": false,
8593
// Is already wrapped by Flake8, prospector and pylama

0 commit comments

Comments
 (0)