Skip to content

Change entrypoint name to simply be black #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

chantera
Copy link

@chantera chantera commented Jan 16, 2023

This PR renames the entrypoint name pylsp_black to black.

Currently, pylsp.plugins.black.enabled: false cannot disable the plugin because pluggy.PluginManager used in pylsp.config.config.Config registers a plugin using its entrypoint name [link].
Thus, the plugin is registered as pylsp_black and can be disabled by pylsp.plugins.pylsp_black.enabled: false.
This is confusing because we have to use pylsp.plugins.pylsp_black.enabled when disabling the plugin while using pylsp.plugins.black.* to give settings to black.
This issue does not occur in python-lsp-ruff because it uses ruff as its entrypoint name [link].

Fixes #41.

@haplo haplo added this to the v2.0.0 milestone May 19, 2023
@ccordoba12 ccordoba12 changed the title Fix entrypoint. Change entrypoint name to simply be black May 20, 2023
@ccordoba12
Copy link
Member

@haplo, I think this one is good to go, right?

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @chantera!

@ccordoba12 ccordoba12 merged commit 89216e7 into python-lsp:master Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration key and plugin name mismatch
3 participants