Open agoose77 opened 2 years ago
Sorry for the late reply, was extremely burnt out and just switched off.
I am not quite sure what you mean here, could you please elaborate?
like SQL?
Oh, I missed this! Sorry to hear that you've been burnt out Ryan, hope you've been able to take a break of some kind :/
Let's say that I wanted to use clang-format (or some other tool). If this plugin supported entry-points, it would be able to discover additional third-party formatters that provided these entry-points. This would mean that you'd end up maintaining the entry-point interface, rather than N
plugin implementations. Effectively, this package just becomes a way of launching a formatted and applying the result.
E.g.
pyproject.toml
[project.entry-points.jupyterlab-code-formatter]
isort = "isort-formatter:plugin"
jupyterlab_code_formatter/plugins.py
import importlib.metadata
def load_formatters():
entry_points = importlib.metadata.entry_points(group="jupyterlab-code-formatter")
return {
ep.name: ep.load() for ep in entry_points
}
This would: