File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ install_requires =
2525python_requires = >= 3.8
2626
2727[options.entry_points]
28- pylsp = pylsp_black = pylsp_black.plugin
28+ pylsp = black = pylsp_black.plugin
2929
3030[options.extras_require]
3131# add any types-* packages to .pre-commit-config.yaml mypy additional_dependencies
Original file line number Diff line number Diff line change 1919 load_config ,
2020 pylsp_format_document ,
2121 pylsp_format_range ,
22+ pylsp_settings ,
2223)
2324
2425here = Path (__file__ ).parent
@@ -294,7 +295,7 @@ def test_load_config_with_skip_options(config_with_skip_options):
294295
295296def test_entry_point ():
296297 distribution = pkg_resources .get_distribution ("python-lsp-black" )
297- entry_point = distribution .get_entry_info ("pylsp" , "pylsp_black " )
298+ entry_point = distribution .get_entry_info ("pylsp" , "black " )
298299
299300 assert entry_point is not None
300301
@@ -348,3 +349,13 @@ def test_cache_config(config, unformatted_document):
348349 for _ in range (5 ):
349350 pylsp_format_document (config , unformatted_document )
350351 assert _load_config .cache_info ().hits == 4
352+
353+
354+ def test_pylsp_settings (config ):
355+ plugins = dict (config .plugin_manager .list_name_plugin ())
356+ assert "black" in plugins
357+ assert plugins ["black" ] not in config .disabled_plugins
358+ config .update ({"plugins" : {"black" : {"enabled" : False }}})
359+ assert plugins ["black" ] in config .disabled_plugins
360+ config .update (pylsp_settings ())
361+ assert plugins ["black" ] not in config .disabled_plugins
You can’t perform that action at this time.
0 commit comments