Add base vars and sudo check

This commit is contained in:
Benjamin Zimmerman 2022-12-13 14:20:23 +00:00
parent c151fd6910
commit 054f5ad80c
8733 changed files with 137813 additions and 15 deletions

View file

@ -0,0 +1 @@
/home/runner/.cache/pip/pool/ae/c0/2b/478e57f395ae45802b2aa70fcf99bba3eabf4cd700c065cd62a7d92a1b

View file

@ -0,0 +1,230 @@
Metadata-Version: 2.1
Name: replit-python-lsp-server
Version: 1.15.9
Summary: Python Language Server for the Language Server Protocol
Author: Python Language Server Contributors
License: MIT
Project-URL: Homepage, https://github.com/replit/python-lsp-server
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jedi (<0.19.0,>=0.17.2)
Requires-Dist: python-lsp-jsonrpc (>=1.0.0)
Requires-Dist: pluggy (>=1.0.0)
Requires-Dist: ujson (>=3.0.0)
Requires-Dist: setuptools (>=39.0.0)
Requires-Dist: toml (>=0.10.2)
Provides-Extra: all
Requires-Dist: autopep8 (<1.7.0,>=1.6.0) ; extra == 'all'
Requires-Dist: flake8 (<5.1.0,>=5.0.0) ; extra == 'all'
Requires-Dist: mccabe (<0.8.0,>=0.7.0) ; extra == 'all'
Requires-Dist: pycodestyle (<2.10.0,>=2.9.0) ; extra == 'all'
Requires-Dist: pydocstyle (>=2.0.0) ; extra == 'all'
Requires-Dist: pyflakes (<2.6.0,>=2.5.0) ; extra == 'all'
Requires-Dist: pylint (>=2.5.0) ; extra == 'all'
Requires-Dist: rope (>=0.10.5) ; extra == 'all'
Requires-Dist: yapf ; extra == 'all'
Requires-Dist: whatthepatch ; extra == 'all'
Provides-Extra: autopep8
Requires-Dist: autopep8 (<1.7.0,>=1.6.0) ; extra == 'autopep8'
Provides-Extra: flake8
Requires-Dist: flake8 (<5.1.0,>=5.0.0) ; extra == 'flake8'
Provides-Extra: mccabe
Requires-Dist: mccabe (<0.8.0,>=0.7.0) ; extra == 'mccabe'
Provides-Extra: pycodestyle
Requires-Dist: pycodestyle (<2.10.0,>=2.9.0) ; extra == 'pycodestyle'
Provides-Extra: pydocstyle
Requires-Dist: pydocstyle (>=2.0.0) ; extra == 'pydocstyle'
Provides-Extra: pyflakes
Requires-Dist: pyflakes (<2.6.0,>=2.5.0) ; extra == 'pyflakes'
Provides-Extra: pylint
Requires-Dist: pylint (>=2.5.0) ; extra == 'pylint'
Provides-Extra: rope
Requires-Dist: rope (>0.10.5) ; extra == 'rope'
Provides-Extra: test
Requires-Dist: pylint (>=2.5.0) ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: coverage ; extra == 'test'
Requires-Dist: numpy (<1.23) ; extra == 'test'
Requires-Dist: pandas ; extra == 'test'
Requires-Dist: matplotlib ; extra == 'test'
Requires-Dist: pyqt5 ; extra == 'test'
Requires-Dist: flaky ; extra == 'test'
Provides-Extra: websockets
Requires-Dist: websockets (>=10.3) ; extra == 'websockets'
Provides-Extra: yapf
Requires-Dist: yapf ; extra == 'yapf'
Requires-Dist: whatthepatch (<2.0.0,>=1.0.2) ; extra == 'yapf'
# Python LSP Server
This is a fork of https://github.com/python-lsp/python-lsp-server.
See [RELEASE.md] for how to make a new release.
A Python 3.7+ implementation of the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol).
(Note: versions <1.4 should still work with Python 3.6)
## 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-lsp-server
```
This will expose the command `pylsp` on your PATH. Confirm that installation succeeded by running `pylsp --help`.
If the respective dependencies are found, the following optional providers will be enabled:
- [Rope](https://github.com/python-rope/rope) for Completions and renaming
- [Pyflakes](https://github.com/PyCQA/pyflakes) linter to detect various errors
- [McCabe](https://github.com/PyCQA/mccabe) linter for complexity checking
- [pycodestyle](https://github.com/PyCQA/pycodestyle) linter for style checking
- [pydocstyle](https://github.com/PyCQA/pydocstyle) linter for docstring style checking (disabled by default)
- [autopep8](https://github.com/hhatto/autopep8) for code formatting
- [YAPF](https://github.com/google/yapf) for code formatting (preferred over autopep8)
- [flake8](https://github.com/pycqa/flake8) for error checking (disabled by default)
- [pylint](https://github.com/PyCQA/pylint) for code linting (disabled by default)
Optional providers can be installed using the `extras` syntax. To install [YAPF](https://github.com/google/yapf) formatting for example:
```
pip install "python-lsp-server[yapf]"
```
All optional providers can be installed using:
```
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.
```
pip install -U setuptools
```
### Windows and Linux installation
If you use Anaconda/Miniconda, you can install `python-lsp-server` using this conda command
```
conda install -c conda-forge python-lsp-server
```
Python-lsp-server is available in the repos of every major Linux distribution, and it is usually called `python-lsp-server`.
For example, here is how to install it in Debian and Debian-based distributions (E.g. Ubuntu, Pop!_OS, Linux Mint)
```
sudo apt-get install python-lsp-server
```
or Fedora Linux
```
sudo dnf install python-lsp-server
```
Only on Alpine Linux the package is named differently. You can install it there by typing this command in your terminal:
```
apk add py3-lsp-server
```
### 3rd Party Plugins
Installing these plugins will add extra functionality to the language server:
- [pylsp-mypy](https://github.com/Richardk2n/pylsp-mypy): [MyPy](http://mypy-lang.org/) type checking for Python >=3.7.
- [pyls-isort](https://github.com/paradoxxxzero/pyls-isort): code formatting using [isort](https://github.com/PyCQA/isort) (automatic import sorting).
- [python-lsp-black](https://github.com/python-lsp/python-lsp-black): code formatting using [Black](https://github.com/psf/black).
- [pyls-memestra](https://github.com/QuantStack/pyls-memestra): detecting the use of deprecated APIs.
- [pylsp-rope](https://github.com/python-rope/pylsp-rope): Extended refactoring capabilities using [Rope](https://github.com/python-rope/rope).
Please see the above repositories for examples on how to write plugins for the Python LSP Server.
[cookiecutter-pylsp-plugin](https://github.com/python-lsp/cookiecutter-pylsp-plugin) is a [cookiecutter](https://cookiecutter.readthedocs.io/) template for setting up a basic plugin project for python-lsp-server. It documents all the essentials you need to know to kick start your own plugin project.
Please file an issue if you require assistance writing a plugin.
## Configuration
Like all language servers, configuration can be passed from the client that talks to this server (i.e. your editor/IDE or other tool that has the same purpose). The details of how this is done depend on the editor or plugin that you are using to communicate with `python-lsp-server`. The configuration options available at that level are documented in [`CONFIGURATION.md`](https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md).
`python-lsp-server` depends on other tools, like flake8 and pycodestyle. These tools can be configured via settings passed from the client (as above), or alternatively from other configuration sources. The following sources are available:
- `pycodestyle`: discovered in `~/.config/pycodestyle`, `setup.cfg`, `tox.ini` and `pycodestyle.cfg`.
- `flake8`: discovered in `~/.config/flake8`, `.flake8`, `setup.cfg` and `tox.ini`
The default configuration sources are `pycodestyle` and `pyflakes`. If you would like to use `flake8`, you will need to:
1. Disable `pycodestyle`, `mccabe`, and `pyflakes`, by setting their corresponding `enabled` configurations, e.g. `pylsp.plugins.pycodestyle.enabled`, to `false`. This will prevent duplicate linting messages as flake8 includes these tools.
1. Set `pylsp.plugins.flake8.enabled` to `true`.
1. Change the `pylsp.configurationSources` setting (in the value passed in from your client) to `['flake8']` in order to use the flake8 configuration instead.
The configuration options available in these config files (`setup.cfg` etc) are documented in the relevant tools:
- [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html)
- [pycodestyle configuration](https://pycodestyle.pycqa.org/en/latest/intro.html#configuration)
Overall configuration is computed first from user configuration (in home directory), overridden by configuration passed in by the language client, and then overridden by configuration discovered in the workspace.
As an example, to change the list of errors that pycodestyle will ignore, assuming you are using the `pycodestyle` configuration source (the default), you can:
1. Add the following to your ~/.config/pycodestyle:
```
[pycodestyle]
ignore = E226,E302,E41
```
2. Set the `pylsp.plugins.pycodestyle.ignore` config value from your editor
3. Same as 1, but add to `setup.cfg` file in the root of the project.
Python LSP Server can communicate over WebSockets when configured as follows:
```
pylsp --ws --port [port]
```
The following libraries are required for Web Sockets support:
- [websockets](https://websockets.readthedocs.io/en/stable/) for Python LSP Server Web sockets using websockets library. refer [Websockets installation](https://websockets.readthedocs.io/en/stable/intro/index.html#installation) for more details
You can install this dependency with command below:
```
pip install 'python-lsp-server[websockets]'
```
## LSP Server Features
* Auto Completion
* Code Linting
* Signature Help
* Go to definition
* Hover
* Find References
* Document Symbols
* Document Formatting
* Code folding
* Multiple workspaces
## Development
To run the test suite:
```sh
pip install ".[test]" && pytest
```
After adding configuration options to `schema.json`, refresh the `CONFIGURATION.md` file with
```
python scripts/jsonschema2md.py pylsp/config/schema.json CONFIGURATION.md
```
## License
This project is made available under the MIT License.

View file

@ -0,0 +1,84 @@
../../../bin/pylsp,sha256=S3zhbJPAK-1HL99Q_bnvvsgm-L3kCp3oSK2RxDAESlE,217
pylsp/__init__.py,sha256=eA2siqOMoaD3byUTOl2HBxcp5QpRYRmEVnVkNe4lAPI,760
pylsp/__main__.py,sha256=xVnxipfb9jjFcfcTwMBYkxuSKred-YRUKXoGdr5qAlw,3874
pylsp/__pycache__/__init__.cpython-38.pyc,,
pylsp/__pycache__/__main__.cpython-38.pyc,,
pylsp/__pycache__/_utils.cpython-38.pyc,,
pylsp/__pycache__/_version.cpython-38.pyc,,
pylsp/__pycache__/hookspecs.cpython-38.pyc,,
pylsp/__pycache__/lsp.cpython-38.pyc,,
pylsp/__pycache__/python_lsp.cpython-38.pyc,,
pylsp/__pycache__/text_edit.cpython-38.pyc,,
pylsp/__pycache__/uris.cpython-38.pyc,,
pylsp/__pycache__/workspace.cpython-38.pyc,,
pylsp/_utils.py,sha256=QmBR3uv1_HvGt04Q2uQBkp6xcyj6taqg0Pj6LJKamQE,7426
pylsp/_version.py,sha256=CIhJP6Om2nMfIBHdZ5JU0UJLjscemeUx5lbtavjK-bk,23
pylsp/config/__init__.py,sha256=bDWxRjmELPCVGy243_0kNrG7PttyZsv_eZ9JTKQrU1E,105
pylsp/config/__pycache__/__init__.cpython-38.pyc,,
pylsp/config/__pycache__/config.cpython-38.pyc,,
pylsp/config/__pycache__/flake8_conf.cpython-38.pyc,,
pylsp/config/__pycache__/pycodestyle_conf.cpython-38.pyc,,
pylsp/config/__pycache__/source.cpython-38.pyc,,
pylsp/config/config.py,sha256=UedVbdsjUC3VUIDZbZG_J962lyYc04W2Z2QvkRAjvj0,6391
pylsp/config/flake8_conf.py,sha256=AZQaQrm2_jF-Qx8o6IRUuYefP18jGU-AYQOm-0qfpe4,2187
pylsp/config/pycodestyle_conf.py,sha256=KtWTmFvxBIwdx9Z3IaMXDa4dOuif-Z-Apo8elkbwXQ4,1268
pylsp/config/source.py,sha256=NKeTG791YV49LDNsMAMntY6Eyqmy2cDcz2kj2JUF7FQ,2729
pylsp/hookspecs.py,sha256=uaqUHfGVpS2hMPjtjHJzpRIHOUffB-jTE1ElqExwBiw,2308
pylsp/lsp.py,sha256=QGFhulj9Z90HlwuCppwR00eFVz7aE_11cjQpS9XiGBU,1421
pylsp/plugins/__init__.py,sha256=bDWxRjmELPCVGy243_0kNrG7PttyZsv_eZ9JTKQrU1E,105
pylsp/plugins/__pycache__/__init__.cpython-38.pyc,,
pylsp/plugins/__pycache__/_resolvers.cpython-38.pyc,,
pylsp/plugins/__pycache__/autopep8_format.cpython-38.pyc,,
pylsp/plugins/__pycache__/definition.cpython-38.pyc,,
pylsp/plugins/__pycache__/flake8_lint.cpython-38.pyc,,
pylsp/plugins/__pycache__/folding.cpython-38.pyc,,
pylsp/plugins/__pycache__/highlight.cpython-38.pyc,,
pylsp/plugins/__pycache__/hover.cpython-38.pyc,,
pylsp/plugins/__pycache__/jedi_completion.cpython-38.pyc,,
pylsp/plugins/__pycache__/jedi_rename.cpython-38.pyc,,
pylsp/plugins/__pycache__/mccabe_lint.cpython-38.pyc,,
pylsp/plugins/__pycache__/preload_imports.cpython-38.pyc,,
pylsp/plugins/__pycache__/pycodestyle_lint.cpython-38.pyc,,
pylsp/plugins/__pycache__/pydocstyle_lint.cpython-38.pyc,,
pylsp/plugins/__pycache__/pyflakes_lint.cpython-38.pyc,,
pylsp/plugins/__pycache__/pylint_lint.cpython-38.pyc,,
pylsp/plugins/__pycache__/references.cpython-38.pyc,,
pylsp/plugins/__pycache__/rope_completion.cpython-38.pyc,,
pylsp/plugins/__pycache__/rope_rename.cpython-38.pyc,,
pylsp/plugins/__pycache__/signature.cpython-38.pyc,,
pylsp/plugins/__pycache__/symbols.cpython-38.pyc,,
pylsp/plugins/__pycache__/yapf_format.cpython-38.pyc,,
pylsp/plugins/_resolvers.py,sha256=-FzrOjmPUjXeTIWMez6RNXgbPYsldSCdIHlEMOi0A3o,4415
pylsp/plugins/autopep8_format.py,sha256=lxtnD5h6UW5diVvWhwD85ZwbPsyKlqsBAE3DPemtPWw,3127
pylsp/plugins/definition.py,sha256=v6ZJqz5DfjZVR_Tdq3dpcQ9MGTmoLQ_Jjq8cqBvYKaE,1243
pylsp/plugins/flake8_lint.py,sha256=-8igBun8Dtkq-SamWxayMbeZdUEGWyi42LDB2cZ5uxg,6905
pylsp/plugins/folding.py,sha256=1ajnKEkjaTdO-g1PLO3RI4xiW0xvV1oaiyBusAmX71E,7050
pylsp/plugins/highlight.py,sha256=-0h2XlkWiT4q7xgSwnQsQI81h1TdMaHx_4_49Benvks,995
pylsp/plugins/hover.py,sha256=AxISfTS7-otckDAbxyARHq_7rur67n2lL2kv4w8K99g,1440
pylsp/plugins/jedi_completion.py,sha256=UrZZrmVQEzOg3rehfOWEI3cR3jdk7-YrNZwvy-rB6YY,8715
pylsp/plugins/jedi_rename.py,sha256=KKEg1SFvgNiaw_2bJ8NGcCvpTmm7gnBI5tQMVbVByow,1792
pylsp/plugins/mccabe_lint.py,sha256=wN-y9uNH4LfqEwI-zv_xImE-amNqA1OVdL3ascb-mrM,1366
pylsp/plugins/preload_imports.py,sha256=Qet8VVeiLaI00fy99A9S59W0Tb0tiXjjYnA3SXZIrnY,1395
pylsp/plugins/pycodestyle_lint.py,sha256=XHWU_WSvE-k___bF73lunGoG7t_OxHA0m7xDSvN6iQs,3366
pylsp/plugins/pydocstyle_lint.py,sha256=iyTuKCCYgUaMIJzVyzha9dA8LhpQEcBRWPB3YKtOWis,3750
pylsp/plugins/pyflakes_lint.py,sha256=2NRLV9_liepb3ZeTSt3kp6XsYG8C2o_JeszNJOW5Zr8,2675
pylsp/plugins/pylint_lint.py,sha256=C4KSmdxucLVt53rH6z7GzHTRjwws0QFkbfMm7txq1lI,11805
pylsp/plugins/references.py,sha256=TlS3FXZ4V1uUNnoorX_IVGADghxyTo842G1S7PYDZiE,961
pylsp/plugins/rope_completion.py,sha256=z_39JR93qGBc4YiaGKqjvwHrKoEbSLpmYocTq_2D0io,5145
pylsp/plugins/rope_rename.py,sha256=ohFGXHdOYWWXcUWtIGeOexSL6hZheaORZsfgIBy22LY,1899
pylsp/plugins/signature.py,sha256=WUtRmMpz--mVDak3W4vXAaADd-_37PgtyQU54SSmrrA,1929
pylsp/plugins/symbols.py,sha256=9ViKLIXM2vp2tBBsmRH7ZQNmUcb9WsAqymoQPSSSzME,8415
pylsp/plugins/yapf_format.py,sha256=Ytjq0rN_vLsWjDvBjrl7IaIMtsYth5NmqJ79UJj9P8c,6489
pylsp/python_lsp.py,sha256=brCbTrmjcdbQ2ys330MLTDrk4lRcdDM0i7ItaOQNeUo,22970
pylsp/text_edit.py,sha256=1mi7H6M2zgwmc95ySmp7SjDy9Q-keHTbl4Yyok3I5yQ,2753
pylsp/uris.py,sha256=vAm7s9YpCvt_E5CkAsrOw_ZHb7b7oBKkuNj6G7aoccI,3725
pylsp/workspace.py,sha256=Doe01X08hismF3lD1SFaCGrPsgnf-ABTcbQSbNzzO4U,10865
replit_python_lsp_server-1.15.9.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
replit_python_lsp_server-1.15.9.dist-info/LICENSE,sha256=rsArR45X85WuRYArKqcPz5m7o-q_TNcAwGXNYqfZKhs,1147
replit_python_lsp_server-1.15.9.dist-info/METADATA,sha256=K0Ow1_Ufm9iaxDzWXiU83MjXO342bOHarlRx2bUx0O4,9684
replit_python_lsp_server-1.15.9.dist-info/RECORD,,
replit_python_lsp_server-1.15.9.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
replit_python_lsp_server-1.15.9.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
replit_python_lsp_server-1.15.9.dist-info/direct_url.json,sha256=tS0S6Wi5MC8t6UsQbJ9RyJVnuu1eKVWX3l87sJXlSS4,267
replit_python_lsp_server-1.15.9.dist-info/entry_points.txt,sha256=jVdvAYZ1iEtUzSl_g6k_eW_oRt7eyi3kEpiyPm2yWfk,852
replit_python_lsp_server-1.15.9.dist-info/top_level.txt,sha256=LamqoHzmagL8tkMqWx8FqE2ByHDcRKZwh7OJEyvru14,6

View file

@ -0,0 +1 @@
/home/runner/.cache/pip/pool/1b/5e/87/e00dc87a84269cead8578b9e6462928e18a95f1f3373c9eef451a5bcc0

View file

@ -0,0 +1 @@
{"archive_info": {"hash": "sha256=205faf150008be7d3da2ac16fc178c833d22835e24841cb82b666443a6b28bef"}, "url": "https://files.pythonhosted.org/packages/09/42/44ff903505cefa2b2d06fcc164ddff74510eece259e30da6a0c2c68976c8/replit_python_lsp_server-1.15.9-py3-none-any.whl"}

View file

@ -0,0 +1 @@
/home/runner/.cache/pip/pool/8d/57/6f/018675884b54cd297f83a93f796fe846dedeca2de41298b23e6db259f9

View file

@ -0,0 +1 @@
/home/runner/.cache/pip/pool/2d/a9/aa/a07ce66a02fcb6432a5b1f05a84d81c870dc44a67087b389132bebbb5e