aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Herrmann <adrian.herrmann@qt.io>2023-12-05 03:28:49 +0100
committerAdrian Herrmann <adrian.herrmann@qt.io>2023-12-06 15:54:51 +0100
commit2e06e148ff33b66ca64d4cc3acb2aa4f79f89d94 (patch)
tree9ccfac261ad39174fe4a5a4bf3fddd73116415ad
parentdcf38e34858ee74857a1cc431b12a3b88865cade (diff)
Configure flake8 arguments
Configure arguments for running flake8 from a CLI or inside VS Code. This includes the following rules: - Ignore E115: Expected an indented block (comment). This is triggered by our snippet syntax (#!) - Ignore E265: Block comment should start with '# '. Same reason as above. - Ignore W503: Line break occurred before a binary operator. Conflicts with W504, so one of them must be ignored. - Set max line length to 100 instead of 79 in line with our coding style. - Exclude files auto-generated by User Interface Compiler and Resource Compiler. Pick-to: 6.6 Change-Id: Ibd954e4b670abdcad2eef00d62e41ad691567924 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
-rw-r--r--.vscode/settings.json11
-rw-r--r--setup.cfg4
2 files changed, 14 insertions, 1 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 57f2286da..969dd1de0 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -12,5 +12,14 @@
"*_test.py"
],
"python.testing.pytestEnabled": false,
- "python.testing.unittestEnabled": true
+ "python.testing.unittestEnabled": true,
+ "flake8.args": [
+ "--ignore=E115,E265,W503",
+ "--max-line-length=100"
+ ],
+ "flake8.ignorePatterns": [
+ "rc_*.py",
+ "*_rc.py",
+ "ui_*.py",
+ ]
}
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 000000000..8a5c9d69a
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,4 @@
+[flake8]
+ignore = E115,E265,W503
+max-line-length = 100
+exclude = rc_*.py,*_rc.py,ui_*.py