Skip to content

PR: Rename namespace to pylsp and package to python-lsp-server #10

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 25 commits into from
Apr 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[run]
omit = pyls/_version.py
omit = pylsp/_version.py
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyls/_version.py export-subst
pylsp/_version.py export-subst
8 changes: 4 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -28,13 +28,13 @@ jobs:
with:
# TODO: check with Python 3, but need to fix the
# errors first
python-version: '2.7'
python-version: '3.6'
architecture: 'x64'
- run: python -m pip install --upgrade pip setuptools
- run: pip install -e .[pylint,pycodestyle,pyflakes]
- name: Pylint checks
run: pylint pyls test
run: pylint pylsp test
- name: Code style checks
run: pycodestyle pyls test
run: pycodestyle pylsp test
- name: Pyflakes checks
run: pyflakes pyls test
run: pyflakes pylsp test
6 changes: 5 additions & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6', '2.7']
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6']
timeout-minutes: 10
steps:
- uses: actions/cache@v1
@@ -41,3 +41,7 @@ jobs:
- run: python -m pip install --upgrade pip setuptools
- run: pip install -e .[all,test]
- run: pytest -v test/
# Enable this if SSH debugging is required
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}
6 changes: 5 additions & 1 deletion .github/workflows/test-mac.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6', '2.7']
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6']
timeout-minutes: 10
steps:
- uses: actions/cache@v1
@@ -41,3 +41,7 @@ jobs:
- run: python -m pip install --upgrade pip setuptools
- run: pip install -e .[all,test]
- run: pytest -v test/
# Enable this if SSH debugging is required
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}
2 changes: 1 addition & 1 deletion .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6', '2.7']
PYTHON_VERSION: ['3.9', '3.8', '3.7', '3.6']
timeout-minutes: 10
steps:
- uses: actions/cache@v1
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -25,5 +25,5 @@ reports = no
[TYPECHECK]

generated-members =
pyls_*
pylsp_*
cache_clear
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright 2017 Palantir Technologies, Inc.
Copyright 2017-2020 Palantir Technologies, Inc.
Copyright 2021 Python Language Server Contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include README.md
include versioneer.py
include pyls/_version.py
include pylsp/_version.py
include LICENSE
include .pylintrc
recursive-include test *.py
41 changes: 7 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Python Language Server
# Python LSP Server

[![image](https://github.com/python-ls/python-ls/workflows/Linux%20tests/badge.svg)](https://github.com/python-ls/python-ls/actions?query=workflow%3A%22Linux+tests%22) [![image](https://github.com/python-ls/python-ls/workflows/Mac%20tests/badge.svg)](https://github.com/python-ls/python-ls/actions?query=workflow%3A%22Mac+tests%22) [![image](https://github.com/python-ls/python-ls/workflows/Windows%20tests/badge.svg)](https://github.com/python-ls/python-ls/actions?query=workflow%3A%22Windows+tests%22) [![image](https://img.shields.io/github/license/python-ls/python-ls.svg)](https://github.com/python-ls/python-ls/blob/master/LICENSE)

A Python 2.7 and 3.5+ implementation of the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol).
A Python 3.6+ implementation of the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol).

## Installation

The base language server requires [Jedi](https://github.com/davidhalter/jedi) to provide Completions, Definitions, Hover, References, Signature Help, and Symbols:

```
pip install python-language-server
pip install python-lsp-server
```

If the respective dependencies are found, the following optional providers will be enabled:
@@ -24,13 +24,13 @@ If the respective dependencies are found, the following optional providers will
Optional providers can be installed using the `extras` syntax. To install [YAPF](https://github.com/google/yapf) formatting for example:

```
pip install 'python-language-server[yapf]'
pip install 'python-lsp-server[yapf]'
```

All optional providers can be installed using:

```
pip install 'python-language-server[all]'
pip install 'python-lsp-server[all]'
```

If you get an error similar to `'install_requires' must be a string or list of strings` then please upgrade setuptools before trying again.
@@ -57,12 +57,12 @@ Configuration is loaded from zero or more configuration sources. Currently impl
- pycodestyle: discovered in `~/.config/pycodestyle`, `setup.cfg`, `tox.ini` and `pycodestyle.cfg`.
- flake8: discovered in `~/.config/flake8`, `setup.cfg`, `tox.ini` and `flake8.cfg`

The default configuration source is pycodestyle. Change the `pyls.configurationSources` setting to `['flake8']` in order to respect flake8 configuration instead.
The default configuration source is pycodestyle. Change the `pylsp.configurationSources` setting to `['flake8']` in order to respect flake8 configuration instead.

Overall configuration is computed first from user configuration (in home directory), overridden by configuration passed in by the language client, and then overriden by configuration discovered in the workspace.

To enable pydocstyle for linting docstrings add the following setting in your LSP configuration:
`\` "pyls.plugins.pydocstyle.enabled": true \``
`\` "pylsp.plugins.pydocstyle.enabled": true \``

See [vscode-client/package.json](vscode-client/package.json) for the full set of supported configuration options.

@@ -108,33 +108,6 @@ To run the test suite:
pip install .[test] && pytest
```

# Develop against VS Code

The Python language server can be developed against a local instance of
Visual Studio Code.

Install [VSCode](https://code.visualstudio.com/download)

```bash
# Setup a virtual env
virtualenv env
. env/bin/activate

# Install pyls
pip install .

# Install the vscode-client extension
cd vscode-client
yarn install

# Run VSCode which is configured to use pyls
# See the bottom of vscode-client/src/extension.ts for info
yarn run vscode -- $PWD/../
```

Then to debug, click View -> Output and in the dropdown will be pyls.
To refresh VSCode, press `Cmd + r`

## License

This project is made available under the MIT License.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
To release a new version of the PyLS you need to follow these steps:
To release a new version of the PyLSP you need to follow these steps:

* Close the current milestone on Github

19 changes: 0 additions & 19 deletions pyls/__init__.py

This file was deleted.

Loading