Skip to content

Commit e150769

Browse files
authored
Merge pull request #34 from bageljrkhanofemus/master
Disable Autopep8 and Yapf if this plugin is installed
2 parents 9c8e61c + e7bc889 commit e150769

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: isort
66
- repo: https://github.com/psf/black
7-
rev: 22.1.0
7+
rev: 22.3.0
88
hooks:
99
- id: black
1010
exclude: fixtures

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pip install python-lsp-black
1515

1616
# Usage
1717

18-
To avoid unexpected results you should make sure `yapf` and `autopep8` are not installed.
18+
This plugin will disable the yapf and autopep8 plugins if installed.
1919

2020
- `python-lsp-black` can either format an entire file or just the selected text.
2121
- The code will only be formatted if it is syntactically valid Python.

pylsp_black/plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def pylsp_settings():
5151
"line_length": 88,
5252
"preview": False,
5353
"cache_config": False,
54-
}
54+
},
55+
"yapf": {"enabled": False},
56+
"autopep8": {"enabled": False},
5557
}
5658
}
5759

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ classifiers =
1818

1919
[options]
2020
packages = find:
21-
install_requires = python-lsp-server>=1.4.0; black>=22.1.0; toml
21+
install_requires = python-lsp-server>=1.4.0; black>=22.3.0; toml
2222
python_requires = >= 3.7
2323

2424
[options.entry_points]

0 commit comments

Comments
 (0)