Skip to content

Commit cf3cea1

Browse files
SusensioSaúl Nogueras
andauthored
Add extendSelect option to flake8 plugin (#559)
Co-authored-by: Saúl Nogueras <susensio@nuc>
1 parent a02339d commit cf3cea1

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

CONFIGURATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This server can be configured using the `workspace/didChangeConfiguration` metho
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. | `[]` |
1111
| `pylsp.plugins.flake8.extendIgnore` | `array` of `string` items | List of errors and warnings to append to ignore list. | `[]` |
12+
| `pylsp.plugins.flake8.extendSelect` | `array` of `string` items | List of errors and warnings to append to select list. | `[]` |
1213
| `pylsp.plugins.flake8.executable` | `string` | Path to the flake8 executable. | `"flake8"` |
1314
| `pylsp.plugins.flake8.filename` | `string` | Only check for filenames matching the patterns in this list. | `null` |
1415
| `pylsp.plugins.flake8.hangClosing` | `boolean` | Hang closing bracket instead of matching indentation of opening bracket's line. | `null` |

pylsp/config/flake8_conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# flake8
2828
("exclude", "plugins.flake8.exclude", list),
2929
("extend-ignore", "plugins.flake8.extendIgnore", list),
30+
("extend-select", "plugins.flake8.extendSelect", list),
3031
("filename", "plugins.flake8.filename", list),
3132
("hang-closing", "plugins.flake8.hangClosing", bool),
3233
("ignore", "plugins.flake8.ignore", list),

pylsp/config/schema.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
},
5454
"description": "List of errors and warnings to append to ignore list."
5555
},
56+
"pylsp.plugins.flake8.extendSelect": {
57+
"type": "array",
58+
"default": [],
59+
"items": {
60+
"type": "string"
61+
},
62+
"description": "List of errors and warnings to append to select list."
63+
},
5664
"pylsp.plugins.flake8.executable": {
5765
"type": "string",
5866
"default": "flake8",
@@ -500,4 +508,4 @@
500508
"description": "The name of the folder in which rope stores project configurations and data. Pass `null` for not using such a folder at all."
501509
}
502510
}
503-
}
511+
}

pylsp/plugins/flake8_lint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def pylsp_lint(workspace, document):
7272
"config": settings.get("config"),
7373
"exclude": settings.get("exclude"),
7474
"extend-ignore": settings.get("extendIgnore"),
75+
"extend-select": settings.get("extendSelect"),
7576
"filename": settings.get("filename"),
7677
"hang-closing": settings.get("hangClosing"),
7778
"ignore": ignores or None,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy