Skip to content

Commit 728929c

Browse files
authored
Pass argument extendIgnore to flake8 (#469)
1 parent 1f415b5 commit 728929c

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

CONFIGURATION.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This server can be configured using the `workspace/didChangeConfiguration` metho
88
| `pylsp.plugins.flake8.config` | `string` | Path to the config file that will be the authoritative config source. | `null` |
99
| `pylsp.plugins.flake8.enabled` | `boolean` | Enable or disable the plugin. | `false` |
1010
| `pylsp.plugins.flake8.exclude` | `array` of `string` items | List of files or directories to exclude. | `[]` |
11+
| `pylsp.plugins.flake8.extendIgnore` | `array` of `string` items | List of errors and warnings to append to ignore list. | `[]` |
1112
| `pylsp.plugins.flake8.executable` | `string` | Path to the flake8 executable. | `"flake8"` |
1213
| `pylsp.plugins.flake8.filename` | `string` | Only check for filenames matching the patterns in this list. | `null` |
1314
| `pylsp.plugins.flake8.hangClosing` | `boolean` | Hang closing bracket instead of matching indentation of opening bracket's line. | `null` |

pylsp/config/flake8_conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
("select", "plugins.pycodestyle.select", list),
2525
# flake8
2626
("exclude", "plugins.flake8.exclude", list),
27+
("extend-ignore", "plugins.flake8.extendIgnore", list),
2728
("filename", "plugins.flake8.filename", list),
2829
("hang-closing", "plugins.flake8.hangClosing", bool),
2930
("ignore", "plugins.flake8.ignore", list),

pylsp/config/schema.json

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
},
3838
"description": "List of files or directories to exclude."
3939
},
40+
"pylsp.plugins.flake8.extendIgnore": {
41+
"type": "array",
42+
"default": [],
43+
"items": {
44+
"type": "string"
45+
},
46+
"description": "List of errors and warnings to append to ignore list."
47+
},
4048
"pylsp.plugins.flake8.executable": {
4149
"type": "string",
4250
"default": "flake8",

pylsp/plugins/flake8_lint.py

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def pylsp_lint(workspace, document):
5858
opts = {
5959
"config": settings.get("config"),
6060
"exclude": settings.get("exclude"),
61+
"extend-ignore": settings.get("extendIgnore"),
6162
"filename": settings.get("filename"),
6263
"hang-closing": settings.get("hangClosing"),
6364
"ignore": ignores or None,

0 commit comments

Comments
 (0)