Skip to content

Commit 39309c7

Browse files
committed
Allow clients to configure the preview option
This was added in Black 22.1.0
1 parent 96d8d90 commit 39309c7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

pylsp_black/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def _load_config(filename: str, client_config: Config) -> Dict:
115115
"pyi": filename.endswith(".pyi"),
116116
"skip_string_normalization": False,
117117
"target_version": set(),
118+
"preview": settings.get("preview", False),
118119
}
119120

120121
root = black.find_project_root((filename,))

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>=19.3b0; toml
21+
install_requires = python-lsp-server>=1.4.0; black>=22.1.0; toml
2222
python_requires = >= 3.7
2323

2424
[options.entry_points]

0 commit comments

Comments
 (0)