Skip to content

Commit 6526756

Browse files
committed
Support pycodestyle indent-size option
1 parent 7b98f9f commit 6526756

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

Diff for: CONFIGURATION.md

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ This server can be configured using `workspace/didChangeConfiguration` method. E
4444
| `pylsp.plugins.pycodestyle.ignore` | `array` of unique `string` items | Ignore errors and warnings | `null` |
4545
| `pylsp.plugins.pycodestyle.hangClosing` | `boolean` | Hang closing bracket instead of matching indentation of opening bracket's line. | `null` |
4646
| `pylsp.plugins.pycodestyle.maxLineLength` | `number` | Set maximum allowed line length. | `null` |
47+
| `pylsp.plugins.pycodestyle.indentSize` | `number` | Set indentation spaces. | `null` |
4748
| `pylsp.plugins.pydocstyle.enabled` | `boolean` | Enable or disable the plugin. | `false` |
4849
| `pylsp.plugins.pydocstyle.convention` | `string` | Choose the basic list of checked errors by specifying an existing convention. | `null` |
4950
| `pylsp.plugins.pydocstyle.addIgnore` | `array` of unique `string` items | Ignore errors and warnings in addition to the specified convention. | `null` |

Diff for: pylsp/config/flake8_conf.py

+2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
('hang-closing', 'plugins.pycodestyle.hangClosing', bool),
2121
('ignore', 'plugins.pycodestyle.ignore', list),
2222
('max-line-length', 'plugins.pycodestyle.maxLineLength', int),
23+
('indent-size', 'plugins.pycodestyle.indentSize', int),
2324
('select', 'plugins.pycodestyle.select', list),
2425
# flake8
2526
('exclude', 'plugins.flake8.exclude', list),
2627
('filename', 'plugins.flake8.filename', list),
2728
('hang-closing', 'plugins.flake8.hangClosing', bool),
2829
('ignore', 'plugins.flake8.ignore', list),
2930
('max-line-length', 'plugins.flake8.maxLineLength', int),
31+
('indent-size', 'plugins.flake8.indentSize', int),
3032
('select', 'plugins.flake8.select', list),
3133
('per-file-ignores', 'plugins.flake8.perFileIgnores', list),
3234
]

Diff for: pylsp/config/pycodestyle_conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
('hang-closing', 'plugins.pycodestyle.hangClosing', bool),
1717
('ignore', 'plugins.pycodestyle.ignore', list),
1818
('max-line-length', 'plugins.pycodestyle.maxLineLength', int),
19+
('indent-size', 'plugins.pycodestyle.indentSize', int),
1920
('select', 'plugins.pycodestyle.select', list),
2021
('aggressive', 'plugins.pycodestyle.aggressive', int),
2122
]

Diff for: pylsp/plugins/flake8_lint.py

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def pylsp_lint(workspace, document):
4343
'hang-closing': settings.get('hangClosing'),
4444
'ignore': ignores or None,
4545
'max-line-length': settings.get('maxLineLength'),
46+
'indent-size': settings.get('indentSize'),
4647
'select': settings.get('select'),
4748
}
4849

Diff for: pylsp/plugins/pycodestyle_lint.py

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def pylsp_lint(workspace, document):
3232
'hang_closing': settings.get('hangClosing'),
3333
'ignore': settings.get('ignore'),
3434
'max_line_length': settings.get('maxLineLength'),
35+
'indent_size': settings.get('indentSize'),
3536
'select': settings.get('select'),
3637
}
3738
kwargs = {k: v for k, v in opts.items() if v}

0 commit comments

Comments
 (0)