pyls.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. from .config import load_config_schema
  2. from .utils import PythonModuleSpec
  3. class PalantirPythonLanguageServer(PythonModuleSpec):
  4. python_module = key = "pyls"
  5. languages = ["python"]
  6. spec = dict(
  7. display_name="pyls",
  8. mime_types=["text/python", "text/x-ipython"],
  9. urls=dict(
  10. home="https://github.com/palantir/python-language-server",
  11. issues="https://github.com/palantir/python-language-server/issues",
  12. ),
  13. install=dict(
  14. pip="pip install 'python-language-server[all]'",
  15. conda="conda install -c conda-forge python-language-server",
  16. ),
  17. extend=[
  18. dict(
  19. display_name="pyls-mypy",
  20. install=dict(
  21. pip="pip install pyls-mypy", conda="conda install pyls-mypy"
  22. ),
  23. ),
  24. dict(
  25. display_name="pyls-black",
  26. install=dict(
  27. pip="pip install pyls-black", conda="conda install pyls-black"
  28. ),
  29. ),
  30. dict(display_name="pyls-isort", install=dict(pip="pip install pyls-isort")),
  31. ],
  32. config_schema=load_config_schema(key),
  33. env=dict(PYTHONUNBUFFERED="1"),
  34. )