From a81f7a20a57a6d5531a34553768832e61b225411 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 24 Dec 2022 18:30:00 -0500 Subject: [PATCH] Migrate to pip-tools and Hatch --- .github/workflows/ci.yaml | 9 +- .github/workflows/release.yaml | 18 +- README.md | 16 +- justfile | 18 +- poetry.lock | 482 --------------------------------- pyproject.toml | 46 ++-- requirements-dev.txt | 187 +++++++++++++ requirements.txt | 50 ++++ ruff_lsp/__init__.py | 9 +- ruff_lsp/__main__.py | 6 +- tests/client/session.py | 36 +-- tests/test_server.py | 5 +- 12 files changed, 310 insertions(+), 572 deletions(-) delete mode 100644 poetry.lock create mode 100644 requirements-dev.txt create mode 100644 requirements.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c5072d9..162fa8e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,9 +11,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] - poetry-version: [ "1.3.1" ] - os: [ ubuntu-18.04, macos-latest, windows-latest ] + python-version: [ "3.7", "3.8", "3.9", "3.10" ] + os: [ ubuntu-latest, macos-latest, windows-latest ] runs-on: ${{ matrix.os }} steps: - uses: extractions/setup-just@v1 @@ -23,10 +22,6 @@ jobs: - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Run image - uses: abatilo/actions-poetry@v2 - with: - poetry-version: ${{ matrix.poetry-version }} - name: Install dependencies run: just install - name: Run checks diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e0f7b17..c37de74 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,27 +6,23 @@ on: env: PYTHON_VERSION: "3.7" - POETRY_VERSION: "1.3.1" jobs: release: - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: ${{ env.PYTHON_VERSION }} - - name: Run image - uses: abatilo/actions-poetry@v2 - with: - poetry-version: ${{ env.POETRY_VERSION }} + - name: Install Hatch + run: python3 -m pip install hatch - name: Install dependencies - run: poetry build + run: hatch build - name: Publish to PyPi if: "startsWith(github.ref, 'refs/tags/')" env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.RUFF_LSP_TOKEN }} + HATCH_INDEX_USER: __token__ + HATCH_INDEX_AUTH: ${{ secrets.RUFF_LSP_TOKEN }} run: | - pip install --upgrade twine - twine upload --skip-existing dist/* + hatch publish diff --git a/README.md b/README.md index 0b4b8fe..0f47657 100644 --- a/README.md +++ b/README.md @@ -179,16 +179,12 @@ the following settings are supported: ## Development -Install [`just`](https://github.com/casey/just). - -`ruff-lsp` uses Poetry for environment management and packaging. To get started, clone the -repository, install Poetry, and run `poetry install` (or `just install`). - -To automatically format the codebase, run: `just fmt`. - -To run lint and type checks, run: `just check`. - -To run tests, run: `just test`. +- Install [`just`](https://github.com/casey/just), or see the `justfile` for corresponding commands. +- Create and activate a virtual environment (e.g., `python -m venv .venv && source .venv/bin/activate`). +- Install development dependencies (`just install`). +- To automatically format the codebase, run: `just fmt`. +- To run lint and type checks, run: `just check`. +- To run tests, run: `just test`. ## License diff --git a/justfile b/justfile index 4eb40ce..850c067 100644 --- a/justfile +++ b/justfile @@ -1,19 +1,21 @@ default: fmt check lock: - poetry lock + pip-compile --resolver=backtracking --generate-hashes -o requirements.txt pyproject.toml + pip-compile --resolver=backtracking --generate-hashes --extra dev -o requirements-dev.txt pyproject.toml install: - poetry install + pip install --no-deps -r requirements.txt + pip install --no-deps -r requirements-dev.txt fmt: - poetry run ruff --fix ./ruff_lsp ./tests - poetry run black ./ruff_lsp ./tests + ruff --fix ./ruff_lsp ./tests + black ./ruff_lsp ./tests check: - poetry run ruff ./ruff_lsp ./tests - poetry run black --check ./ruff_lsp ./tests - poetry run mypy ./ruff_lsp ./tests + ruff ./ruff_lsp ./tests + black --check ./ruff_lsp ./tests + mypy ./ruff_lsp ./tests test: - poetry run python -m unittest + python -m unittest diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index 33dccb7..0000000 --- a/poetry.lock +++ /dev/null @@ -1,482 +0,0 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. - -[[package]] -name = "attrs" -version = "22.2.0" -description = "Classes Without Boilerplate" -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, - {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, -] - -[package.extras] -cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] -tests = ["attrs[tests-no-zope]", "zope.interface"] -tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] - -[[package]] -name = "black" -version = "22.12.0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"}, - {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"}, - {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"}, - {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"}, - {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"}, - {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"}, - {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"}, - {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"}, - {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"}, - {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"}, - {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"}, - {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} -typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} -typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - -[[package]] -name = "cattrs" -version = "22.2.0" -description = "Composable complex class support for attrs and dataclasses." -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "cattrs-22.2.0-py3-none-any.whl", hash = "sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21"}, - {file = "cattrs-22.2.0.tar.gz", hash = "sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d"}, -] - -[package.dependencies] -attrs = ">=20" -exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} -typing_extensions = {version = "*", markers = "python_version < \"3.8\""} - -[[package]] -name = "click" -version = "8.1.3" -description = "Composable command line interface toolkit" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "exceptiongroup" -version = "1.1.0" -description = "Backport of PEP 654 (exception groups)" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"}, - {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"}, -] - -[package.extras] -test = ["pytest (>=6)"] - -[[package]] -name = "importlib-metadata" -version = "5.2.0" -description = "Read metadata from Python packages" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "importlib_metadata-5.2.0-py3-none-any.whl", hash = "sha256:0eafa39ba42bf225fc00e67f701d71f85aead9f878569caf13c3724f704b970f"}, - {file = "importlib_metadata-5.2.0.tar.gz", hash = "sha256:404d48d62bba0b7a77ff9d405efd91501bef2e67ff4ace0bed40a0cf28c3c7cd"}, -] - -[package.dependencies] -typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} -zipp = ">=0.5" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] - -[[package]] -name = "lsprotocol" -version = "2022.0.0a9" -description = "Python implementation of the Language Server Protocol." -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "lsprotocol-2022.0.0a9-py3-none-any.whl", hash = "sha256:e4bc3d2ed71045f64cbe4d053bd6d45300a77b122b372a383914ce4ddb9c62d4"}, - {file = "lsprotocol-2022.0.0a9.tar.gz", hash = "sha256:db81eafc80485a6052f6771aaf6fb9cef58cb6409d510c60132f12c6e91d9182"}, -] - -[package.dependencies] -attrs = "*" -cattrs = "*" - -[[package]] -name = "mypy" -version = "0.991" -description = "Optional static typing for Python" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "mypy-0.991-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7d17e0a9707d0772f4a7b878f04b4fd11f6f5bcb9b3813975a9b13c9332153ab"}, - {file = "mypy-0.991-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0714258640194d75677e86c786e80ccf294972cc76885d3ebbb560f11db0003d"}, - {file = "mypy-0.991-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0c8f3be99e8a8bd403caa8c03be619544bc2c77a7093685dcf308c6b109426c6"}, - {file = "mypy-0.991-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc9ec663ed6c8f15f4ae9d3c04c989b744436c16d26580eaa760ae9dd5d662eb"}, - {file = "mypy-0.991-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4307270436fd7694b41f913eb09210faff27ea4979ecbcd849e57d2da2f65305"}, - {file = "mypy-0.991-cp310-cp310-win_amd64.whl", hash = "sha256:901c2c269c616e6cb0998b33d4adbb4a6af0ac4ce5cd078afd7bc95830e62c1c"}, - {file = "mypy-0.991-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d13674f3fb73805ba0c45eb6c0c3053d218aa1f7abead6e446d474529aafc372"}, - {file = "mypy-0.991-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1c8cd4fb70e8584ca1ed5805cbc7c017a3d1a29fb450621089ffed3e99d1857f"}, - {file = "mypy-0.991-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:209ee89fbb0deed518605edddd234af80506aec932ad28d73c08f1400ef80a33"}, - {file = "mypy-0.991-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37bd02ebf9d10e05b00d71302d2c2e6ca333e6c2a8584a98c00e038db8121f05"}, - {file = "mypy-0.991-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:26efb2fcc6b67e4d5a55561f39176821d2adf88f2745ddc72751b7890f3194ad"}, - {file = "mypy-0.991-cp311-cp311-win_amd64.whl", hash = "sha256:3a700330b567114b673cf8ee7388e949f843b356a73b5ab22dd7cff4742a5297"}, - {file = "mypy-0.991-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:1f7d1a520373e2272b10796c3ff721ea1a0712288cafaa95931e66aa15798813"}, - {file = "mypy-0.991-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:641411733b127c3e0dab94c45af15fea99e4468f99ac88b39efb1ad677da5711"}, - {file = "mypy-0.991-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3d80e36b7d7a9259b740be6d8d906221789b0d836201af4234093cae89ced0cd"}, - {file = "mypy-0.991-cp37-cp37m-win_amd64.whl", hash = "sha256:e62ebaad93be3ad1a828a11e90f0e76f15449371ffeecca4a0a0b9adc99abcef"}, - {file = "mypy-0.991-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b86ce2c1866a748c0f6faca5232059f881cda6dda2a893b9a8373353cfe3715a"}, - {file = "mypy-0.991-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac6e503823143464538efda0e8e356d871557ef60ccd38f8824a4257acc18d93"}, - {file = "mypy-0.991-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0cca5adf694af539aeaa6ac633a7afe9bbd760df9d31be55ab780b77ab5ae8bf"}, - {file = "mypy-0.991-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a12c56bf73cdab116df96e4ff39610b92a348cc99a1307e1da3c3768bbb5b135"}, - {file = "mypy-0.991-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:652b651d42f155033a1967739788c436491b577b6a44e4c39fb340d0ee7f0d70"}, - {file = "mypy-0.991-cp38-cp38-win_amd64.whl", hash = "sha256:4175593dc25d9da12f7de8de873a33f9b2b8bdb4e827a7cae952e5b1a342e243"}, - {file = "mypy-0.991-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:98e781cd35c0acf33eb0295e8b9c55cdbef64fcb35f6d3aa2186f289bed6e80d"}, - {file = "mypy-0.991-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6d7464bac72a85cb3491c7e92b5b62f3dcccb8af26826257760a552a5e244aa5"}, - {file = "mypy-0.991-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c9166b3f81a10cdf9b49f2d594b21b31adadb3d5e9db9b834866c3258b695be3"}, - {file = "mypy-0.991-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8472f736a5bfb159a5e36740847808f6f5b659960115ff29c7cecec1741c648"}, - {file = "mypy-0.991-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e80e758243b97b618cdf22004beb09e8a2de1af481382e4d84bc52152d1c476"}, - {file = "mypy-0.991-cp39-cp39-win_amd64.whl", hash = "sha256:74e259b5c19f70d35fcc1ad3d56499065c601dfe94ff67ae48b85596b9ec1461"}, - {file = "mypy-0.991-py3-none-any.whl", hash = "sha256:de32edc9b0a7e67c2775e574cb061a537660e51210fbf6006b0b36ea695ae9bb"}, - {file = "mypy-0.991.tar.gz", hash = "sha256:3c0165ba8f354a6d9881809ef29f1a9318a236a6d81c690094c5df32107bde06"}, -] - -[package.dependencies] -mypy-extensions = ">=0.4.3" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""} -typing-extensions = ">=3.10" - -[package.extras] -dmypy = ["psutil (>=4.0)"] -install-types = ["pip"] -python2 = ["typed-ast (>=1.4.0,<2)"] -reports = ["lxml"] - -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] - -[[package]] -name = "pathspec" -version = "0.10.3" -description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"}, - {file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"}, -] - -[[package]] -name = "platformdirs" -version = "2.6.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "platformdirs-2.6.0-py3-none-any.whl", hash = "sha256:1a89a12377800c81983db6be069ec068eee989748799b946cce2a6e80dcc54ca"}, - {file = "platformdirs-2.6.0.tar.gz", hash = "sha256:b46ffafa316e6b83b47489d240ce17173f123a9b9c83282141c3daf26ad9ac2e"}, -] - -[package.extras] -docs = ["furo (>=2022.9.29)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.4)"] -test = ["appdirs (==1.4.4)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] - -[[package]] -name = "pygls" -version = "1.0.0" -description = "a pythonic generic language server (pronounced like \"pie glass\")." -category = "main" -optional = false -python-versions = "<3.12,>=3.7" -files = [ - {file = "pygls-1.0.0-py3-none-any.whl", hash = "sha256:3414594ac29ff3ab990f004c675d1077e4e2659eae5cc3ae67cc6fa4d861e342"}, - {file = "pygls-1.0.0.tar.gz", hash = "sha256:c2a1c22e30028f7ca9d3f0a04da8eef29f0f1701bdbd97d8614d8e1e6711f336"}, -] - -[package.dependencies] -lsprotocol = "*" -typeguard = ">=2.10.0,<3" - -[package.extras] -dev = ["bandit (==1.7.4)", "flake8 (==4.0.1)", "mypy (==0.961)"] -docs = ["sphinx (==5.0.1)", "sphinx-rtd-theme (==1.0.0)"] -test = ["mock (==4.0.3)", "pytest (==7.1.2)", "pytest-asyncio (==0.18.3)"] -ws = ["websockets (>=10.0.0,<11.0.0)"] - -[[package]] -name = "python-lsp-jsonrpc" -version = "1.0.0" -description = "JSON RPC 2.0 server library" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "python-lsp-jsonrpc-1.0.0.tar.gz", hash = "sha256:7bec170733db628d3506ea3a5288ff76aa33c70215ed223abdb0d95e957660bd"}, - {file = "python_lsp_jsonrpc-1.0.0-py3-none-any.whl", hash = "sha256:079b143be64b0a378bdb21dff5e28a8c1393fe7e8a654ef068322d754e545fc7"}, -] - -[package.dependencies] -ujson = ">=3.0.0" - -[package.extras] -test = ["coverage", "pycodestyle", "pyflakes", "pylint", "pytest", "pytest-cov"] - -[[package]] -name = "ruff" -version = "0.0.193" -description = "An extremely fast Python linter, written in Rust." -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "ruff-0.0.193-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:9206f0e613c40094c7bc21f67edc0e4278f0c28a242b5842f8c0b122defa46d2"}, - {file = "ruff-0.0.193-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:3ee66a0051dc31ffeb1b59cb020f82e1c362663ba37dfb061b9232e4153ee935"}, - {file = "ruff-0.0.193-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62c7c1447eff6431a51fc25e2f6720d3d8b81a40f414352d113f28ce70d52469"}, - {file = "ruff-0.0.193-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8fc164a9ffcce6e0ce85f952919dc614d93d8ab63df5511f53842272499698ac"}, - {file = "ruff-0.0.193-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4319a3dc670d5f44d94db5bf5e12b00c5130e9d2c492f38f99b02c51f695a6d5"}, - {file = "ruff-0.0.193-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:36c34e5158b3f3759ae69ff2aedb7cd10c8a9cb556d690ad18752dcdff4ead98"}, - {file = "ruff-0.0.193-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4cde4b16e2ef3fe514b1c41c6726c7402d1d5a689e5b1d011ba181f21a706e4c"}, - {file = "ruff-0.0.193-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e2810d882c628d2caf163dd4b641dca83cb35a03400faa56077fac37235aca6"}, - {file = "ruff-0.0.193-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e547bec229d55ddfe113582929864d7a6281a582cc96434f3e11bf33e6c2fb73"}, - {file = "ruff-0.0.193-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:660bde0e557ac85a09e1be98104701a407095cb3d4efd8552724b628a66d2172"}, - {file = "ruff-0.0.193-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d27b30ab4275318580c435d218c7e5828d4d47da3f79d01e8a43894b1dd9cd72"}, - {file = "ruff-0.0.193-py3-none-musllinux_1_2_i686.whl", hash = "sha256:2336ce3742dac5d3d8b23b934c49262a7887c1531a253ed2659ebc83efdc45fa"}, - {file = "ruff-0.0.193-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:034e668b4d143d1db90bce8dd3963a9b13dd9994338d5d3338a0a8bac175a767"}, - {file = "ruff-0.0.193-py3-none-win32.whl", hash = "sha256:49a54da735d5dd25744a08266dbbebe7679e03245d03a26a59bbd26e58d1b8ce"}, - {file = "ruff-0.0.193-py3-none-win_amd64.whl", hash = "sha256:dc6252016c5057e4bf593242ae53bbefc6e65f8914b1a54aedb2a4a9cae2aceb"}, - {file = "ruff-0.0.193.tar.gz", hash = "sha256:269068501ae1074ed73fc8d36614f0d8690eaa4469f1d658f3b65b8d420c7d71"}, -] - -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] - -[[package]] -name = "typed-ast" -version = "1.5.4" -description = "a fork of Python 2 and 3 ast modules with type comment support" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"}, - {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"}, - {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"}, - {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe"}, - {file = "typed_ast-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72"}, - {file = "typed_ast-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec"}, - {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47"}, - {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6"}, - {file = "typed_ast-1.5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1"}, - {file = "typed_ast-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6"}, - {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"}, - {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c"}, - {file = "typed_ast-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2"}, - {file = "typed_ast-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d"}, - {file = "typed_ast-1.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f"}, - {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc"}, - {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6"}, - {file = "typed_ast-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e"}, - {file = "typed_ast-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35"}, - {file = "typed_ast-1.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97"}, - {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3"}, - {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72"}, - {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"}, - {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"}, -] - -[[package]] -name = "typeguard" -version = "2.13.3" -description = "Run-time type checker for Python" -category = "main" -optional = false -python-versions = ">=3.5.3" -files = [ - {file = "typeguard-2.13.3-py3-none-any.whl", hash = "sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1"}, - {file = "typeguard-2.13.3.tar.gz", hash = "sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4"}, -] - -[package.extras] -doc = ["sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["mypy", "pytest", "typing-extensions"] - -[[package]] -name = "typing-extensions" -version = "4.4.0" -description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, -] - -[[package]] -name = "ujson" -version = "5.6.0" -description = "Ultra fast JSON encoder and decoder for Python" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "ujson-5.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b74396a655ac8a5299dcb765b4a17ba706e45c0df95818bcc6c13c4645a1c38e"}, - {file = "ujson-5.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f63535d51e039a984b2fb67ff87057ffe4216d4757c3cedf2fc846af88253cb7"}, - {file = "ujson-5.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4420bfff18ca6aa39cfb22fe35d8aba3811fa1190c4f4e1ad816b0aad72f7e3"}, - {file = "ujson-5.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35423460954d0c61602da734697724e8dd5326a8aa7900123e584b935116203e"}, - {file = "ujson-5.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:169b3fbd1188647c6ce00cb690915526aff86997c89a94c1b50432010ad7ae0f"}, - {file = "ujson-5.6.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:91000612a2c30f50c6a009e6459a677e5c1972e51b59ecefd6063543dc47a4e9"}, - {file = "ujson-5.6.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b72d4d948749e9c6afcd3d7af9ecc780fccde84e26d275c97273dd83c68a488b"}, - {file = "ujson-5.6.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aff708a1b9e2d4979f74375ade0bff978be72c8bd90422a756d24d8a46d78059"}, - {file = "ujson-5.6.0-cp310-cp310-win32.whl", hash = "sha256:6ea9024749a41864bffb12da15aace4a3193c03ea97e77b069557aefa342811f"}, - {file = "ujson-5.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:1217326ba80eab1ff3f644f9eee065bd4fcc4e0c068a2f86f851cafd05737169"}, - {file = "ujson-5.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bfb1fdf61763fafc0f8a20becf9cc4287c14fc41c0e14111d28c0d0dfda9ba56"}, - {file = "ujson-5.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fecf83b2ef3cbce4f5cc573df6f6ded565e5e27c1af84038bae5ade306686d82"}, - {file = "ujson-5.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213e41dc501b4a6d029873039da3e45ba7766b9f9eba97ecc4287c371f5403cc"}, - {file = "ujson-5.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad74eb53ee07e76c82f9ef8e7256c33873b81bd1f97a274fdb65ed87c2801f6"}, - {file = "ujson-5.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a68a204386648ec92ae9b526c1ffca528f38221eca70f98b4709390c3204275"}, - {file = "ujson-5.6.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4be7d865cb5161824e12db71cee83290ab72b3523566371a30d6ba1bd63402a"}, - {file = "ujson-5.6.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:dde59d2f06297fc4e70b2bae6e4a6b3ce89ca89697ab2c41e641abae3be96b0c"}, - {file = "ujson-5.6.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:551408a5c4306839b4a4f91503c96069204dbef2c7ed91a9dab08874ac1ed679"}, - {file = "ujson-5.6.0-cp311-cp311-win32.whl", hash = "sha256:ceee5aef3e234c7e998fdb52e5236c41e50cdedc116360f7f1874a04829f6490"}, - {file = "ujson-5.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:dd5ccc036b0f4721b98e1c03ccc604e7f3e1db53866ccc92b2add40ace1782f7"}, - {file = "ujson-5.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7a66c5a75b46545361271b4cf55560d9ad8bad794dd054a14b3fbb031407948e"}, - {file = "ujson-5.6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d0a60c5f065737a81249c819475d001a86da9a41900d888287e34619c9b4851"}, - {file = "ujson-5.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9cf04fcc958bb52a6b6c301b780cb9afab3ec68713b17ca5aa423e1f99c2c1cf"}, - {file = "ujson-5.6.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24d40e01accbf4f0ba5181c4db1bac83749fdc1a5413466da582529f2a096085"}, - {file = "ujson-5.6.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3f8b9e8c0420ce3dcc193ab6dd5628840ba79ad1b76e1816ac7ca6752c6bf035"}, - {file = "ujson-5.6.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:0f0f21157d1a84ad5fb54388f31767cde9c1a48fb29de7ef91d8887fdc2ca92b"}, - {file = "ujson-5.6.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:82bf24ea72a73c7d77402a7adc954931243e7ec4241d5738ae74894b53944458"}, - {file = "ujson-5.6.0-cp37-cp37m-win32.whl", hash = "sha256:3b49a1014d396b962cb1d6c5f867f88b2c9aa9224c3860ee6ff63b2837a2965b"}, - {file = "ujson-5.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:74671d1bde8c03daeb92abdbd972960978347b1a1d432c4c1b3c9284ce4094cf"}, - {file = "ujson-5.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:72fa6e850831280a46704032721c75155fd41b839ddadabb6068ab218c56a37a"}, - {file = "ujson-5.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:57904e5b49ffe93189349229dcd83f73862ef9bb8517e8f1e62d0ff73f313847"}, - {file = "ujson-5.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61fdf24f7bddc402ce06b25e4bed7bf5ee4f03e23028a0a09116835c21d54888"}, - {file = "ujson-5.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7174e81c137d480abe2f8036e9fb69157e509f2db0bfdee4488eb61dc3f0ff6b"}, - {file = "ujson-5.6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1a7e4023c79d9a053c0c6b7c6ec50ea0af78381539ab27412e6af8d9410ae555"}, - {file = "ujson-5.6.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:31288f85db6295ec63e128daff7285bb0bc220935e1b5107bd2d67e2dc687b7e"}, - {file = "ujson-5.6.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f3e651f04b7510fae7d4706a4600cd43457f015df08702ece82a71339fc15c3d"}, - {file = "ujson-5.6.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:52f536712d16a1f4e0f9d084982c28e11b7e70c397a1059069e4d28d53b3f522"}, - {file = "ujson-5.6.0-cp38-cp38-win32.whl", hash = "sha256:23051f062bb257a87f3e55ea5a055ea98d56f08185fd415b34313268fa4d814e"}, - {file = "ujson-5.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:fb1632b27e12c0b0df62f924c362206daf246a42c0080e959dd465810dc3482e"}, - {file = "ujson-5.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3f00dff3bf26bbb96791ceaf51ca95a3f34e2a21985748da855a650c38633b99"}, - {file = "ujson-5.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d1b5e233e42f53bbbc6961caeb492986e9f3aeacd30be811467583203873bad2"}, - {file = "ujson-5.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a51cbe614acb5ea8e2006e4fd80b4e8ea7c51ae51e42c75290012f4925a9d6ab"}, - {file = "ujson-5.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b2aece7a92dffc9c78787f5f36e47e24b95495812270c27abc2fa430435a931d"}, - {file = "ujson-5.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:20d929a27822cb79e034cc5e0bb62daa0257ab197247cb6f35d5149f2f438983"}, - {file = "ujson-5.6.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7bde16cb18b95a8f68cc48715e4652b394b4fee68cb3f9fee0fd7d26b29a53b6"}, - {file = "ujson-5.6.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bca3c06c3f10ce03fa80b1301dce53765815c2578a24bd141ce4e5769bb7b709"}, - {file = "ujson-5.6.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e5715b0e2767b1987ceed0066980fc0a53421dd2f197b4f88460d474d6aef4c"}, - {file = "ujson-5.6.0-cp39-cp39-win32.whl", hash = "sha256:a8795de7ceadf84bcef88f947f91900d647eda234a2c6cc89912c25048cc0490"}, - {file = "ujson-5.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b9e9d26600020cf635a4e58763959f5a59f8c70f75d72ebf26ceae94c2efac74"}, - {file = "ujson-5.6.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:798116b88158f13ed687417526100ef353ba4692e0aef8afbc622bd4bf7e9057"}, - {file = "ujson-5.6.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c169e12642f0edf1dde607fb264721b88787b55a6da5fb3824302a9cac6f9405"}, - {file = "ujson-5.6.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2d70b7f0b485f85141bbc518d0581ae96b912d9f8b070eaf68a9beef8eb1e60"}, - {file = "ujson-5.6.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2cb7a4bd91de97b4c8e57fb5289d1e5f3f019723b59d01d79e2df83783dce5a6"}, - {file = "ujson-5.6.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:ae723b8308ac17a591bb8be9478b58c2c26fada23fd2211fc323796801ad7ff5"}, - {file = "ujson-5.6.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2a24b9a96364f943a4754fa00b47855d0a01b84ac4b8b11ebf058c8fb68c1f77"}, - {file = "ujson-5.6.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d2ac99503a9a5846157631addacc9f74e23f64d5a886fe910e9662660fa10"}, - {file = "ujson-5.6.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fadebaddd3eb71a5c986f0bdc7bb28b072bfc585c141eef37474fc66d1830b0a"}, - {file = "ujson-5.6.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9f4efcac06f45183b6ed8e2321554739a964a02d8aa3089ec343253d86bf2804"}, - {file = "ujson-5.6.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e97af10b6f13a498de197fb852e9242064217c25dfca79ebe7ad0cf2b0dd0cb7"}, - {file = "ujson-5.6.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:355ef5311854936b9edc7f1ce638f8257cb45fb6b9873f6b2d16a715eafc9570"}, - {file = "ujson-5.6.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4277f6b1d24be30b7f87ec5346a87693cbc1e55bbc5877f573381b2250c4dd6"}, - {file = "ujson-5.6.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d6f4be832d97836d62ac0c148026ec021f9f36481f38e455b51538fcd949ed2a"}, - {file = "ujson-5.6.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bca074d08f0677f05df8170b25ce6e61db3bcdfda78062444972fa6508dc825f"}, - {file = "ujson-5.6.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:87578ccfc35461c77e73660fb7d89bc577732f671364f442bda9e2c58b571765"}, - {file = "ujson-5.6.0.tar.gz", hash = "sha256:f881e2d8a022e9285aa2eab6ba8674358dbcb2b57fa68618d88d62937ac3ff04"}, -] - -[[package]] -name = "zipp" -version = "3.11.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"}, - {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] -testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] - -[metadata] -lock-version = "2.0" -python-versions = ">=3.7,<3.12" -content-hash = "defabca8ba436c76b0409e03656d97b14ac0ebdbabde7713873c63d220d45e51" diff --git a/pyproject.toml b/pyproject.toml index 2b22343..b3b619f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,19 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.poetry] +[project] name = "ruff-lsp" -version = "0.0.9" +dynamic = ["version"] description = "A Language Server Protocol implementation for Ruff." -authors = ["Charlie Marsh "] -maintainers = ["Charlie Marsh "] +authors = [ + { name = "Charlie Marsh", email = "charlie.r.marsh@gmail.com" }, +] +maintainers = [ + { name = "Charlie Marsh", email = "charlie.r.marsh@gmail.com" }, +] +requires-python = ">=3.7" license = "MIT" -readme = "README.md" -repository = "https://github.com/charliermarsh/ruff-lsp" keywords = ["ruff", "lsp", "language-server", "language-server-protocol", "python"] classifiers = [ "Development Status :: 3 - Alpha", @@ -29,20 +32,25 @@ classifiers = [ "Topic :: Software Development :: Testing", "Topic :: Utilities", ] +urls = { repository = "https://github.com/charliermarsh/ruff-lsp" } +dependencies = [ + "pygls>=1.0.0a3", + "ruff>=0.0.150", + "typing_extensions", +] -[tool.poetry.scripts] -ruff-lsp = "ruff_lsp.__main__:main" +[project.optional-dependencies] +dev = [ + "black==22.12.0", + "mypy==0.991", + "python-lsp-jsonrpc==1.0.0", +] -[tool.poetry.dependencies] -python = ">=3.7,<3.12" -pygls = ">1.0.0a3" -ruff = ">0.0.150" -typing_extensions = "*" +[project.scripts] +ruff-lsp = "ruff_lsp.__main__:main" -[tool.poetry.dev-dependencies] -black = "==22.12.0" -mypy = "==0.991" -python-lsp-jsonrpc = "==1.0.0" +[tool.hatch.version] +path = "ruff_lsp/__init__.py" [tool.ruff] line-length = 88 diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..03d8a02 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,187 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --extra=dev --generate-hashes --output-file=requirements-dev.txt --resolver=backtracking pyproject.toml +# +attrs==22.2.0 \ + --hash=sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836 \ + --hash=sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99 + # via + # cattrs + # lsprotocol +black==22.12.0 \ + --hash=sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320 \ + --hash=sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351 \ + --hash=sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350 \ + --hash=sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f \ + --hash=sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf \ + --hash=sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148 \ + --hash=sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4 \ + --hash=sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d \ + --hash=sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc \ + --hash=sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d \ + --hash=sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2 \ + --hash=sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f + # via ruff-lsp (pyproject.toml) +cattrs==22.2.0 \ + --hash=sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21 \ + --hash=sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d + # via lsprotocol +click==8.1.3 \ + --hash=sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e \ + --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48 + # via black +lsprotocol==2022.0.0a9 \ + --hash=sha256:db81eafc80485a6052f6771aaf6fb9cef58cb6409d510c60132f12c6e91d9182 \ + --hash=sha256:e4bc3d2ed71045f64cbe4d053bd6d45300a77b122b372a383914ce4ddb9c62d4 + # via pygls +mypy==0.991 \ + --hash=sha256:0714258640194d75677e86c786e80ccf294972cc76885d3ebbb560f11db0003d \ + --hash=sha256:0c8f3be99e8a8bd403caa8c03be619544bc2c77a7093685dcf308c6b109426c6 \ + --hash=sha256:0cca5adf694af539aeaa6ac633a7afe9bbd760df9d31be55ab780b77ab5ae8bf \ + --hash=sha256:1c8cd4fb70e8584ca1ed5805cbc7c017a3d1a29fb450621089ffed3e99d1857f \ + --hash=sha256:1f7d1a520373e2272b10796c3ff721ea1a0712288cafaa95931e66aa15798813 \ + --hash=sha256:209ee89fbb0deed518605edddd234af80506aec932ad28d73c08f1400ef80a33 \ + --hash=sha256:26efb2fcc6b67e4d5a55561f39176821d2adf88f2745ddc72751b7890f3194ad \ + --hash=sha256:37bd02ebf9d10e05b00d71302d2c2e6ca333e6c2a8584a98c00e038db8121f05 \ + --hash=sha256:3a700330b567114b673cf8ee7388e949f843b356a73b5ab22dd7cff4742a5297 \ + --hash=sha256:3c0165ba8f354a6d9881809ef29f1a9318a236a6d81c690094c5df32107bde06 \ + --hash=sha256:3d80e36b7d7a9259b740be6d8d906221789b0d836201af4234093cae89ced0cd \ + --hash=sha256:4175593dc25d9da12f7de8de873a33f9b2b8bdb4e827a7cae952e5b1a342e243 \ + --hash=sha256:4307270436fd7694b41f913eb09210faff27ea4979ecbcd849e57d2da2f65305 \ + --hash=sha256:5e80e758243b97b618cdf22004beb09e8a2de1af481382e4d84bc52152d1c476 \ + --hash=sha256:641411733b127c3e0dab94c45af15fea99e4468f99ac88b39efb1ad677da5711 \ + --hash=sha256:652b651d42f155033a1967739788c436491b577b6a44e4c39fb340d0ee7f0d70 \ + --hash=sha256:6d7464bac72a85cb3491c7e92b5b62f3dcccb8af26826257760a552a5e244aa5 \ + --hash=sha256:74e259b5c19f70d35fcc1ad3d56499065c601dfe94ff67ae48b85596b9ec1461 \ + --hash=sha256:7d17e0a9707d0772f4a7b878f04b4fd11f6f5bcb9b3813975a9b13c9332153ab \ + --hash=sha256:901c2c269c616e6cb0998b33d4adbb4a6af0ac4ce5cd078afd7bc95830e62c1c \ + --hash=sha256:98e781cd35c0acf33eb0295e8b9c55cdbef64fcb35f6d3aa2186f289bed6e80d \ + --hash=sha256:a12c56bf73cdab116df96e4ff39610b92a348cc99a1307e1da3c3768bbb5b135 \ + --hash=sha256:ac6e503823143464538efda0e8e356d871557ef60ccd38f8824a4257acc18d93 \ + --hash=sha256:b8472f736a5bfb159a5e36740847808f6f5b659960115ff29c7cecec1741c648 \ + --hash=sha256:b86ce2c1866a748c0f6faca5232059f881cda6dda2a893b9a8373353cfe3715a \ + --hash=sha256:bc9ec663ed6c8f15f4ae9d3c04c989b744436c16d26580eaa760ae9dd5d662eb \ + --hash=sha256:c9166b3f81a10cdf9b49f2d594b21b31adadb3d5e9db9b834866c3258b695be3 \ + --hash=sha256:d13674f3fb73805ba0c45eb6c0c3053d218aa1f7abead6e446d474529aafc372 \ + --hash=sha256:de32edc9b0a7e67c2775e574cb061a537660e51210fbf6006b0b36ea695ae9bb \ + --hash=sha256:e62ebaad93be3ad1a828a11e90f0e76f15449371ffeecca4a0a0b9adc99abcef + # via ruff-lsp (pyproject.toml) +mypy-extensions==0.4.3 \ + --hash=sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d \ + --hash=sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8 + # via + # black + # mypy +pathspec==0.10.3 \ + --hash=sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6 \ + --hash=sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6 + # via black +platformdirs==2.6.0 \ + --hash=sha256:1a89a12377800c81983db6be069ec068eee989748799b946cce2a6e80dcc54ca \ + --hash=sha256:b46ffafa316e6b83b47489d240ce17173f123a9b9c83282141c3daf26ad9ac2e + # via black +pygls==1.0.0 \ + --hash=sha256:3414594ac29ff3ab990f004c675d1077e4e2659eae5cc3ae67cc6fa4d861e342 \ + --hash=sha256:c2a1c22e30028f7ca9d3f0a04da8eef29f0f1701bdbd97d8614d8e1e6711f336 + # via ruff-lsp (pyproject.toml) +python-lsp-jsonrpc==1.0.0 \ + --hash=sha256:079b143be64b0a378bdb21dff5e28a8c1393fe7e8a654ef068322d754e545fc7 \ + --hash=sha256:7bec170733db628d3506ea3a5288ff76aa33c70215ed223abdb0d95e957660bd + # via ruff-lsp (pyproject.toml) +ruff==0.0.193 \ + --hash=sha256:034e668b4d143d1db90bce8dd3963a9b13dd9994338d5d3338a0a8bac175a767 \ + --hash=sha256:2336ce3742dac5d3d8b23b934c49262a7887c1531a253ed2659ebc83efdc45fa \ + --hash=sha256:269068501ae1074ed73fc8d36614f0d8690eaa4469f1d658f3b65b8d420c7d71 \ + --hash=sha256:2e2810d882c628d2caf163dd4b641dca83cb35a03400faa56077fac37235aca6 \ + --hash=sha256:36c34e5158b3f3759ae69ff2aedb7cd10c8a9cb556d690ad18752dcdff4ead98 \ + --hash=sha256:3ee66a0051dc31ffeb1b59cb020f82e1c362663ba37dfb061b9232e4153ee935 \ + --hash=sha256:4319a3dc670d5f44d94db5bf5e12b00c5130e9d2c492f38f99b02c51f695a6d5 \ + --hash=sha256:49a54da735d5dd25744a08266dbbebe7679e03245d03a26a59bbd26e58d1b8ce \ + --hash=sha256:4cde4b16e2ef3fe514b1c41c6726c7402d1d5a689e5b1d011ba181f21a706e4c \ + --hash=sha256:62c7c1447eff6431a51fc25e2f6720d3d8b81a40f414352d113f28ce70d52469 \ + --hash=sha256:660bde0e557ac85a09e1be98104701a407095cb3d4efd8552724b628a66d2172 \ + --hash=sha256:8fc164a9ffcce6e0ce85f952919dc614d93d8ab63df5511f53842272499698ac \ + --hash=sha256:9206f0e613c40094c7bc21f67edc0e4278f0c28a242b5842f8c0b122defa46d2 \ + --hash=sha256:d27b30ab4275318580c435d218c7e5828d4d47da3f79d01e8a43894b1dd9cd72 \ + --hash=sha256:dc6252016c5057e4bf593242ae53bbefc6e65f8914b1a54aedb2a4a9cae2aceb \ + --hash=sha256:e547bec229d55ddfe113582929864d7a6281a582cc96434f3e11bf33e6c2fb73 + # via ruff-lsp (pyproject.toml) +typeguard==2.13.3 \ + --hash=sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4 \ + --hash=sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1 + # via pygls +typing-extensions==4.4.0 \ + --hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \ + --hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e + # via + # mypy + # ruff-lsp (pyproject.toml) +ujson==5.6.0 \ + --hash=sha256:0f0f21157d1a84ad5fb54388f31767cde9c1a48fb29de7ef91d8887fdc2ca92b \ + --hash=sha256:1217326ba80eab1ff3f644f9eee065bd4fcc4e0c068a2f86f851cafd05737169 \ + --hash=sha256:169b3fbd1188647c6ce00cb690915526aff86997c89a94c1b50432010ad7ae0f \ + --hash=sha256:1a7e4023c79d9a053c0c6b7c6ec50ea0af78381539ab27412e6af8d9410ae555 \ + --hash=sha256:20d929a27822cb79e034cc5e0bb62daa0257ab197247cb6f35d5149f2f438983 \ + --hash=sha256:213e41dc501b4a6d029873039da3e45ba7766b9f9eba97ecc4287c371f5403cc \ + --hash=sha256:23051f062bb257a87f3e55ea5a055ea98d56f08185fd415b34313268fa4d814e \ + --hash=sha256:24d40e01accbf4f0ba5181c4db1bac83749fdc1a5413466da582529f2a096085 \ + --hash=sha256:2a24b9a96364f943a4754fa00b47855d0a01b84ac4b8b11ebf058c8fb68c1f77 \ + --hash=sha256:2cb7a4bd91de97b4c8e57fb5289d1e5f3f019723b59d01d79e2df83783dce5a6 \ + --hash=sha256:31288f85db6295ec63e128daff7285bb0bc220935e1b5107bd2d67e2dc687b7e \ + --hash=sha256:35423460954d0c61602da734697724e8dd5326a8aa7900123e584b935116203e \ + --hash=sha256:355ef5311854936b9edc7f1ce638f8257cb45fb6b9873f6b2d16a715eafc9570 \ + --hash=sha256:3a68a204386648ec92ae9b526c1ffca528f38221eca70f98b4709390c3204275 \ + --hash=sha256:3ad74eb53ee07e76c82f9ef8e7256c33873b81bd1f97a274fdb65ed87c2801f6 \ + --hash=sha256:3b49a1014d396b962cb1d6c5f867f88b2c9aa9224c3860ee6ff63b2837a2965b \ + --hash=sha256:3f00dff3bf26bbb96791ceaf51ca95a3f34e2a21985748da855a650c38633b99 \ + --hash=sha256:3f8b9e8c0420ce3dcc193ab6dd5628840ba79ad1b76e1816ac7ca6752c6bf035 \ + --hash=sha256:52f536712d16a1f4e0f9d084982c28e11b7e70c397a1059069e4d28d53b3f522 \ + --hash=sha256:551408a5c4306839b4a4f91503c96069204dbef2c7ed91a9dab08874ac1ed679 \ + --hash=sha256:57904e5b49ffe93189349229dcd83f73862ef9bb8517e8f1e62d0ff73f313847 \ + --hash=sha256:5e5715b0e2767b1987ceed0066980fc0a53421dd2f197b4f88460d474d6aef4c \ + --hash=sha256:61fdf24f7bddc402ce06b25e4bed7bf5ee4f03e23028a0a09116835c21d54888 \ + --hash=sha256:6d0a60c5f065737a81249c819475d001a86da9a41900d888287e34619c9b4851 \ + --hash=sha256:6ea9024749a41864bffb12da15aace4a3193c03ea97e77b069557aefa342811f \ + --hash=sha256:7174e81c137d480abe2f8036e9fb69157e509f2db0bfdee4488eb61dc3f0ff6b \ + --hash=sha256:72fa6e850831280a46704032721c75155fd41b839ddadabb6068ab218c56a37a \ + --hash=sha256:74671d1bde8c03daeb92abdbd972960978347b1a1d432c4c1b3c9284ce4094cf \ + --hash=sha256:798116b88158f13ed687417526100ef353ba4692e0aef8afbc622bd4bf7e9057 \ + --hash=sha256:7a66c5a75b46545361271b4cf55560d9ad8bad794dd054a14b3fbb031407948e \ + --hash=sha256:7bde16cb18b95a8f68cc48715e4652b394b4fee68cb3f9fee0fd7d26b29a53b6 \ + --hash=sha256:82bf24ea72a73c7d77402a7adc954931243e7ec4241d5738ae74894b53944458 \ + --hash=sha256:87578ccfc35461c77e73660fb7d89bc577732f671364f442bda9e2c58b571765 \ + --hash=sha256:91000612a2c30f50c6a009e6459a677e5c1972e51b59ecefd6063543dc47a4e9 \ + --hash=sha256:9cf04fcc958bb52a6b6c301b780cb9afab3ec68713b17ca5aa423e1f99c2c1cf \ + --hash=sha256:9f4efcac06f45183b6ed8e2321554739a964a02d8aa3089ec343253d86bf2804 \ + --hash=sha256:a51cbe614acb5ea8e2006e4fd80b4e8ea7c51ae51e42c75290012f4925a9d6ab \ + --hash=sha256:a8795de7ceadf84bcef88f947f91900d647eda234a2c6cc89912c25048cc0490 \ + --hash=sha256:ae723b8308ac17a591bb8be9478b58c2c26fada23fd2211fc323796801ad7ff5 \ + --hash=sha256:aff708a1b9e2d4979f74375ade0bff978be72c8bd90422a756d24d8a46d78059 \ + --hash=sha256:b2aece7a92dffc9c78787f5f36e47e24b95495812270c27abc2fa430435a931d \ + --hash=sha256:b4420bfff18ca6aa39cfb22fe35d8aba3811fa1190c4f4e1ad816b0aad72f7e3 \ + --hash=sha256:b64d2ac99503a9a5846157631addacc9f74e23f64d5a886fe910e9662660fa10 \ + --hash=sha256:b72d4d948749e9c6afcd3d7af9ecc780fccde84e26d275c97273dd83c68a488b \ + --hash=sha256:b74396a655ac8a5299dcb765b4a17ba706e45c0df95818bcc6c13c4645a1c38e \ + --hash=sha256:b9e9d26600020cf635a4e58763959f5a59f8c70f75d72ebf26ceae94c2efac74 \ + --hash=sha256:bca074d08f0677f05df8170b25ce6e61db3bcdfda78062444972fa6508dc825f \ + --hash=sha256:bca3c06c3f10ce03fa80b1301dce53765815c2578a24bd141ce4e5769bb7b709 \ + --hash=sha256:bfb1fdf61763fafc0f8a20becf9cc4287c14fc41c0e14111d28c0d0dfda9ba56 \ + --hash=sha256:c169e12642f0edf1dde607fb264721b88787b55a6da5fb3824302a9cac6f9405 \ + --hash=sha256:c4277f6b1d24be30b7f87ec5346a87693cbc1e55bbc5877f573381b2250c4dd6 \ + --hash=sha256:ceee5aef3e234c7e998fdb52e5236c41e50cdedc116360f7f1874a04829f6490 \ + --hash=sha256:d1b5e233e42f53bbbc6961caeb492986e9f3aeacd30be811467583203873bad2 \ + --hash=sha256:d6f4be832d97836d62ac0c148026ec021f9f36481f38e455b51538fcd949ed2a \ + --hash=sha256:dd5ccc036b0f4721b98e1c03ccc604e7f3e1db53866ccc92b2add40ace1782f7 \ + --hash=sha256:dde59d2f06297fc4e70b2bae6e4a6b3ce89ca89697ab2c41e641abae3be96b0c \ + --hash=sha256:e4be7d865cb5161824e12db71cee83290ab72b3523566371a30d6ba1bd63402a \ + --hash=sha256:e97af10b6f13a498de197fb852e9242064217c25dfca79ebe7ad0cf2b0dd0cb7 \ + --hash=sha256:f2d70b7f0b485f85141bbc518d0581ae96b912d9f8b070eaf68a9beef8eb1e60 \ + --hash=sha256:f3e651f04b7510fae7d4706a4600cd43457f015df08702ece82a71339fc15c3d \ + --hash=sha256:f63535d51e039a984b2fb67ff87057ffe4216d4757c3cedf2fc846af88253cb7 \ + --hash=sha256:f881e2d8a022e9285aa2eab6ba8674358dbcb2b57fa68618d88d62937ac3ff04 \ + --hash=sha256:fadebaddd3eb71a5c986f0bdc7bb28b072bfc585c141eef37474fc66d1830b0a \ + --hash=sha256:fb1632b27e12c0b0df62f924c362206daf246a42c0080e959dd465810dc3482e \ + --hash=sha256:fecf83b2ef3cbce4f5cc573df6f6ded565e5e27c1af84038bae5ade306686d82 + # via python-lsp-jsonrpc diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..af5473f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,50 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --generate-hashes --output-file=requirements.txt --resolver=backtracking pyproject.toml +# +attrs==22.2.0 \ + --hash=sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836 \ + --hash=sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99 + # via + # cattrs + # lsprotocol +cattrs==22.2.0 \ + --hash=sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21 \ + --hash=sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d + # via lsprotocol +lsprotocol==2022.0.0a9 \ + --hash=sha256:db81eafc80485a6052f6771aaf6fb9cef58cb6409d510c60132f12c6e91d9182 \ + --hash=sha256:e4bc3d2ed71045f64cbe4d053bd6d45300a77b122b372a383914ce4ddb9c62d4 + # via pygls +pygls==1.0.0 \ + --hash=sha256:3414594ac29ff3ab990f004c675d1077e4e2659eae5cc3ae67cc6fa4d861e342 \ + --hash=sha256:c2a1c22e30028f7ca9d3f0a04da8eef29f0f1701bdbd97d8614d8e1e6711f336 + # via ruff-lsp (pyproject.toml) +ruff==0.0.193 \ + --hash=sha256:034e668b4d143d1db90bce8dd3963a9b13dd9994338d5d3338a0a8bac175a767 \ + --hash=sha256:2336ce3742dac5d3d8b23b934c49262a7887c1531a253ed2659ebc83efdc45fa \ + --hash=sha256:269068501ae1074ed73fc8d36614f0d8690eaa4469f1d658f3b65b8d420c7d71 \ + --hash=sha256:2e2810d882c628d2caf163dd4b641dca83cb35a03400faa56077fac37235aca6 \ + --hash=sha256:36c34e5158b3f3759ae69ff2aedb7cd10c8a9cb556d690ad18752dcdff4ead98 \ + --hash=sha256:3ee66a0051dc31ffeb1b59cb020f82e1c362663ba37dfb061b9232e4153ee935 \ + --hash=sha256:4319a3dc670d5f44d94db5bf5e12b00c5130e9d2c492f38f99b02c51f695a6d5 \ + --hash=sha256:49a54da735d5dd25744a08266dbbebe7679e03245d03a26a59bbd26e58d1b8ce \ + --hash=sha256:4cde4b16e2ef3fe514b1c41c6726c7402d1d5a689e5b1d011ba181f21a706e4c \ + --hash=sha256:62c7c1447eff6431a51fc25e2f6720d3d8b81a40f414352d113f28ce70d52469 \ + --hash=sha256:660bde0e557ac85a09e1be98104701a407095cb3d4efd8552724b628a66d2172 \ + --hash=sha256:8fc164a9ffcce6e0ce85f952919dc614d93d8ab63df5511f53842272499698ac \ + --hash=sha256:9206f0e613c40094c7bc21f67edc0e4278f0c28a242b5842f8c0b122defa46d2 \ + --hash=sha256:d27b30ab4275318580c435d218c7e5828d4d47da3f79d01e8a43894b1dd9cd72 \ + --hash=sha256:dc6252016c5057e4bf593242ae53bbefc6e65f8914b1a54aedb2a4a9cae2aceb \ + --hash=sha256:e547bec229d55ddfe113582929864d7a6281a582cc96434f3e11bf33e6c2fb73 + # via ruff-lsp (pyproject.toml) +typeguard==2.13.3 \ + --hash=sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4 \ + --hash=sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1 + # via pygls +typing-extensions==4.4.0 \ + --hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \ + --hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e + # via ruff-lsp (pyproject.toml) diff --git a/ruff_lsp/__init__.py b/ruff_lsp/__init__.py index 721b031..00ec2dc 100644 --- a/ruff_lsp/__init__.py +++ b/ruff_lsp/__init__.py @@ -1,8 +1 @@ -import sys - -if sys.version_info < (3, 8): - from importlib_metadata import version -else: - from importlib.metadata import version - -__version__ = version("ruff-lsp") +__version__ = "0.0.9" diff --git a/ruff_lsp/__main__.py b/ruff_lsp/__main__.py index 25b2f56..e043481 100644 --- a/ruff_lsp/__main__.py +++ b/ruff_lsp/__main__.py @@ -1,9 +1,9 @@ import argparse -from ruff_lsp import __version__ - def main() -> None: + from ruff_lsp import __version__, server + parser = argparse.ArgumentParser(prog="ruff-lsp") parser.add_argument( "--version", @@ -12,8 +12,6 @@ def main() -> None: ) parser.parse_args() - from ruff_lsp import server - server.start() diff --git a/tests/client/session.py b/tests/client/session.py index 57fc843..12a6f9f 100644 --- a/tests/client/session.py +++ b/tests/client/session.py @@ -7,13 +7,12 @@ import sys from concurrent.futures import Future, ThreadPoolExecutor from threading import Event -from typing import Any +from typing import Any, Callable from pylsp_jsonrpc.dispatchers import MethodDispatcher from pylsp_jsonrpc.endpoint import Endpoint from pylsp_jsonrpc.streams import JsonRpcStreamReader, JsonRpcStreamWriter -from tests.client.constants import PROJECT_ROOT from tests.client.defaults import VSCODE_DEFAULT_INITIALIZE from tests.client.utils import unwrap @@ -28,16 +27,16 @@ class LspSession(MethodDispatcher): """Send and Receive messages over LSP.""" - def __init__(self, cwd=None, script=None): - self.cwd = cwd if cwd else os.getcwd() - self.script = script if script else (PROJECT_ROOT / "ruff_lsp" / "server.py") + def __init__(self, cwd: str, module: str): + self.cwd = cwd + self.module = module self._thread_pool: ThreadPoolExecutor = ThreadPoolExecutor() self._sub: subprocess.Popen | None = None - self._writer: JsonRpcStreamWriter | None = None self._reader: JsonRpcStreamReader | None = None + self._writer: JsonRpcStreamWriter | None = None self._endpoint: Any = None - self._notification_callbacks = {} + self._notification_callbacks: dict[str, Callable] = {} def __enter__(self): """Context manager entrypoint. @@ -45,7 +44,7 @@ def __enter__(self): shell=True needed for pytest-cov to work in subprocess. """ self._sub = subprocess.Popen( - [sys.executable, str(self.script)], + [sys.executable, "-m", str(self.module)], stdout=subprocess.PIPE, stdin=subprocess.PIPE, bufsize=0, @@ -53,12 +52,8 @@ def __enter__(self): env=os.environ, ) - self._writer = JsonRpcStreamWriter( - os.fdopen(unwrap(self._sub.stdin).fileno(), "wb") - ) - self._reader = JsonRpcStreamReader( - os.fdopen(unwrap(self._sub.stdout).fileno(), "rb") - ) + self._writer = JsonRpcStreamWriter(self._sub.stdin) + self._reader = JsonRpcStreamReader(self._sub.stdout) dispatcher = { PUBLISH_DIAGNOSTICS: self._publish_diagnostics, @@ -71,12 +66,12 @@ def __enter__(self): def __exit__(self, typ, value, _tb): self.shutdown(True) - try: - unwrap(self._sub).terminate() - except Exception: - pass - self._endpoint.shutdown() + unwrap(self._sub).terminate() + unwrap(self._sub).wait() + self._endpoint.shutdown() # type: ignore[union-attr] self._thread_pool.shutdown() + unwrap(self._writer).close() # type: ignore[attr-defined] + unwrap(self._reader).close() # type: ignore[attr-defined] def initialize( self, @@ -147,8 +142,7 @@ def set_notification_callback(self, notification_name, callback): self._notification_callbacks[notification_name] = callback def get_notification_callback(self, notification_name): - """Gets callback if set or default callback for a given LS - notification.""" + """Gets callback if set or default callback for a given LS notification.""" try: return self._notification_callbacks[notification_name] except KeyError: diff --git a/tests/test_server.py b/tests/test_server.py index 0f65cba..e1e9b37 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -2,6 +2,7 @@ from __future__ import annotations import logging +import os import unittest from threading import Event @@ -18,7 +19,7 @@ def test_linting_example(self): contents = TEST_FILE_PATH.read_text() actual = [] - with session.LspSession() as ls_session: + with session.LspSession(cwd=os.getcwd(), module="ruff_lsp") as ls_session: ls_session.initialize(defaults.VSCODE_DEFAULT_INITIALIZE) done = Event() @@ -83,7 +84,7 @@ def test_no_initialization_options(self): contents = TEST_FILE_PATH.read_text() actual = [] - with session.LspSession() as ls_session: + with session.LspSession(cwd=os.getcwd(), module="ruff_lsp") as ls_session: ls_session.initialize( {**defaults.VSCODE_DEFAULT_INITIALIZE, "initializationOptions": None} )