pytest-language-server 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pytest_language_server-0.3.0/.github/workflows/ci.yml +72 -0
- pytest_language_server-0.3.0/.github/workflows/release.yml +211 -0
- pytest_language_server-0.3.0/.gitignore +1 -0
- pytest_language_server-0.3.0/.pre-commit-config.yaml +39 -0
- pytest_language_server-0.3.0/Cargo.lock +1642 -0
- pytest_language_server-0.3.0/Cargo.toml +23 -0
- pytest_language_server-0.3.0/Formula/pytest-language-server.rb +43 -0
- pytest_language_server-0.3.0/LICENSE +21 -0
- pytest_language_server-0.3.0/PKG-INFO +290 -0
- pytest_language_server-0.3.0/README.md +264 -0
- pytest_language_server-0.3.0/RELEASE.md +72 -0
- pytest_language_server-0.3.0/pyproject.toml +40 -0
- pytest_language_server-0.3.0/src/fixtures.rs +1011 -0
- pytest_language_server-0.3.0/src/main.rs +336 -0
- pytest_language_server-0.3.0/tests/manual_test.py +116 -0
- pytest_language_server-0.3.0/tests/test_parser_api.rs +24 -0
- pytest_language_server-0.3.0/tests/test_project/conftest.py +13 -0
- pytest_language_server-0.3.0/tests/test_project/test_example.py +14 -0
- pytest_language_server-0.3.0/uv.lock +253 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master, main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master, main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
RUST_BACKTRACE: 1
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Test
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
20
|
+
rust: [stable]
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Install Rust
|
|
25
|
+
uses: dtolnay/rust-toolchain@master
|
|
26
|
+
with:
|
|
27
|
+
toolchain: ${{ matrix.rust }}
|
|
28
|
+
components: rustfmt, clippy
|
|
29
|
+
|
|
30
|
+
- name: Cache cargo registry
|
|
31
|
+
uses: actions/cache@v4
|
|
32
|
+
with:
|
|
33
|
+
path: ~/.cargo/registry
|
|
34
|
+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
35
|
+
|
|
36
|
+
- name: Cache cargo index
|
|
37
|
+
uses: actions/cache@v4
|
|
38
|
+
with:
|
|
39
|
+
path: ~/.cargo/git
|
|
40
|
+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
|
41
|
+
|
|
42
|
+
- name: Cache cargo build
|
|
43
|
+
uses: actions/cache@v4
|
|
44
|
+
with:
|
|
45
|
+
path: target
|
|
46
|
+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
47
|
+
|
|
48
|
+
- name: Check formatting
|
|
49
|
+
run: cargo fmt -- --check
|
|
50
|
+
|
|
51
|
+
- name: Run clippy
|
|
52
|
+
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
53
|
+
|
|
54
|
+
- name: Build
|
|
55
|
+
run: cargo build --release --verbose
|
|
56
|
+
|
|
57
|
+
- name: Run tests
|
|
58
|
+
run: cargo test --verbose
|
|
59
|
+
|
|
60
|
+
check-msrv:
|
|
61
|
+
name: Check MSRV
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v4
|
|
65
|
+
|
|
66
|
+
- name: Install Rust
|
|
67
|
+
uses: dtolnay/rust-toolchain@master
|
|
68
|
+
with:
|
|
69
|
+
toolchain: 1.83.0
|
|
70
|
+
|
|
71
|
+
- name: Check build
|
|
72
|
+
run: cargo check --all-features
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
linux:
|
|
15
|
+
runs-on: ubuntu-22.04
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: 3.x
|
|
24
|
+
allow-prereleases: true
|
|
25
|
+
- name: Build wheels
|
|
26
|
+
uses: PyO3/maturin-action@v1
|
|
27
|
+
with:
|
|
28
|
+
target: ${{ matrix.target }}
|
|
29
|
+
args: --release --out dist --interpreter python3.10 python3.11 python3.12 python3.13 python3.14 python3.14t pypy3.10 pypy3.11
|
|
30
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
31
|
+
manylinux: auto
|
|
32
|
+
- name: Upload wheels
|
|
33
|
+
uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: wheels-linux-${{ matrix.target }}
|
|
36
|
+
path: dist
|
|
37
|
+
|
|
38
|
+
musllinux:
|
|
39
|
+
runs-on: ubuntu-22.04
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
target: [x86_64, x86, aarch64, armv7]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
- uses: actions/setup-python@v6
|
|
46
|
+
with:
|
|
47
|
+
python-version: 3.x
|
|
48
|
+
allow-prereleases: true
|
|
49
|
+
- name: Build wheels
|
|
50
|
+
uses: PyO3/maturin-action@v1
|
|
51
|
+
with:
|
|
52
|
+
target: ${{ matrix.target }}
|
|
53
|
+
args: --release --out dist --interpreter python3.10 python3.11 python3.12 python3.13 python3.14 python3.14t pypy3.10 pypy3.11
|
|
54
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
55
|
+
manylinux: musllinux_1_2
|
|
56
|
+
- name: Upload wheels
|
|
57
|
+
uses: actions/upload-artifact@v4
|
|
58
|
+
with:
|
|
59
|
+
name: wheels-musllinux-${{ matrix.target }}
|
|
60
|
+
path: dist
|
|
61
|
+
|
|
62
|
+
windows:
|
|
63
|
+
runs-on: windows-latest
|
|
64
|
+
strategy:
|
|
65
|
+
matrix:
|
|
66
|
+
target: [x64, x86]
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v4
|
|
69
|
+
- uses: actions/setup-python@v6
|
|
70
|
+
with:
|
|
71
|
+
python-version: |
|
|
72
|
+
3.10
|
|
73
|
+
3.11
|
|
74
|
+
3.12
|
|
75
|
+
3.13
|
|
76
|
+
3.14
|
|
77
|
+
architecture: ${{ matrix.target }}
|
|
78
|
+
allow-prereleases: true
|
|
79
|
+
- name: Build wheels
|
|
80
|
+
uses: PyO3/maturin-action@v1
|
|
81
|
+
with:
|
|
82
|
+
target: ${{ matrix.target }}
|
|
83
|
+
args: --release --out dist --interpreter 3.10 3.11 3.12 3.13 3.14
|
|
84
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
85
|
+
- name: Upload wheels
|
|
86
|
+
uses: actions/upload-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: wheels-windows-${{ matrix.target }}
|
|
89
|
+
path: dist
|
|
90
|
+
|
|
91
|
+
windows-freethreaded:
|
|
92
|
+
runs-on: windows-latest
|
|
93
|
+
strategy:
|
|
94
|
+
matrix:
|
|
95
|
+
target: [x64, x86]
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/checkout@v4
|
|
98
|
+
- uses: actions/setup-python@v6
|
|
99
|
+
with:
|
|
100
|
+
python-version: '3.14t'
|
|
101
|
+
architecture: ${{ matrix.target }}
|
|
102
|
+
allow-prereleases: true
|
|
103
|
+
- name: Build wheels
|
|
104
|
+
uses: PyO3/maturin-action@v1
|
|
105
|
+
with:
|
|
106
|
+
target: ${{ matrix.target }}
|
|
107
|
+
args: --release --out dist --interpreter 3.14t
|
|
108
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
109
|
+
- name: Upload wheels
|
|
110
|
+
uses: actions/upload-artifact@v4
|
|
111
|
+
with:
|
|
112
|
+
name: wheels-windows-${{ matrix.target }}-freethreaded
|
|
113
|
+
path: dist
|
|
114
|
+
|
|
115
|
+
macos:
|
|
116
|
+
runs-on: ${{ matrix.runner }}
|
|
117
|
+
strategy:
|
|
118
|
+
matrix:
|
|
119
|
+
include:
|
|
120
|
+
- runner: macos-13
|
|
121
|
+
target: x86_64
|
|
122
|
+
- runner: macos-14
|
|
123
|
+
target: aarch64
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@v4
|
|
126
|
+
- uses: actions/setup-python@v6
|
|
127
|
+
with:
|
|
128
|
+
python-version: 3.x
|
|
129
|
+
allow-prereleases: true
|
|
130
|
+
- name: Build wheels
|
|
131
|
+
uses: PyO3/maturin-action@v1
|
|
132
|
+
with:
|
|
133
|
+
target: ${{ matrix.target }}
|
|
134
|
+
args: --release --out dist --interpreter 3.10 3.11 3.12 3.13 3.14 3.14t pypy3.10 pypy3.11
|
|
135
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
136
|
+
- name: Upload wheels
|
|
137
|
+
uses: actions/upload-artifact@v4
|
|
138
|
+
with:
|
|
139
|
+
name: wheels-macos-${{ matrix.target }}
|
|
140
|
+
path: dist
|
|
141
|
+
|
|
142
|
+
sdist:
|
|
143
|
+
runs-on: ubuntu-latest
|
|
144
|
+
steps:
|
|
145
|
+
- uses: actions/checkout@v4
|
|
146
|
+
- name: Build sdist
|
|
147
|
+
uses: PyO3/maturin-action@v1
|
|
148
|
+
with:
|
|
149
|
+
command: sdist
|
|
150
|
+
args: --out dist
|
|
151
|
+
- name: Upload sdist
|
|
152
|
+
uses: actions/upload-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: wheels-sdist
|
|
155
|
+
path: dist
|
|
156
|
+
|
|
157
|
+
release:
|
|
158
|
+
name: Release
|
|
159
|
+
runs-on: ubuntu-latest
|
|
160
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
161
|
+
needs: [linux, musllinux, windows, windows-freethreaded, macos, sdist]
|
|
162
|
+
permissions:
|
|
163
|
+
id-token: write
|
|
164
|
+
contents: write
|
|
165
|
+
attestations: write
|
|
166
|
+
steps:
|
|
167
|
+
- uses: actions/checkout@v4
|
|
168
|
+
|
|
169
|
+
- name: Download all artifacts
|
|
170
|
+
uses: actions/download-artifact@v4
|
|
171
|
+
with:
|
|
172
|
+
pattern: wheels-*
|
|
173
|
+
path: wheels
|
|
174
|
+
|
|
175
|
+
- name: Generate artifact attestation
|
|
176
|
+
uses: actions/attest-build-provenance@v2
|
|
177
|
+
with:
|
|
178
|
+
subject-path: "wheels/*/*.whl"
|
|
179
|
+
|
|
180
|
+
- name: Flatten wheels directory
|
|
181
|
+
run: |
|
|
182
|
+
mkdir -p dist
|
|
183
|
+
find wheels -name "*.whl" -exec cp {} dist/ \;
|
|
184
|
+
find wheels -name "*.tar.gz" -exec cp {} dist/ \;
|
|
185
|
+
ls -lh dist/
|
|
186
|
+
|
|
187
|
+
- name: Create GitHub Release
|
|
188
|
+
uses: softprops/action-gh-release@v2
|
|
189
|
+
with:
|
|
190
|
+
files: dist/*
|
|
191
|
+
generate_release_notes: true
|
|
192
|
+
fail_on_unmatched_files: true
|
|
193
|
+
|
|
194
|
+
- name: Publish to PyPI
|
|
195
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
196
|
+
with:
|
|
197
|
+
skip-existing: true
|
|
198
|
+
verbose: true
|
|
199
|
+
|
|
200
|
+
publish-crates:
|
|
201
|
+
name: Publish to crates.io
|
|
202
|
+
runs-on: ubuntu-latest
|
|
203
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
204
|
+
permissions:
|
|
205
|
+
contents: read
|
|
206
|
+
steps:
|
|
207
|
+
- uses: actions/checkout@v4
|
|
208
|
+
- name: Install Rust
|
|
209
|
+
uses: dtolnay/rust-toolchain@stable
|
|
210
|
+
- name: Publish to crates.io
|
|
211
|
+
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/target
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Pre-commit hooks for pytest-language-server
|
|
2
|
+
# See https://pre-commit.com for more information
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
# Rust formatting
|
|
6
|
+
- repo: local
|
|
7
|
+
hooks:
|
|
8
|
+
- id: cargo-fmt
|
|
9
|
+
name: cargo fmt
|
|
10
|
+
entry: cargo fmt --
|
|
11
|
+
language: system
|
|
12
|
+
types: [rust]
|
|
13
|
+
pass_filenames: true
|
|
14
|
+
|
|
15
|
+
- id: cargo-clippy
|
|
16
|
+
name: cargo clippy
|
|
17
|
+
entry: cargo clippy --all-targets --all-features -- -D warnings
|
|
18
|
+
language: system
|
|
19
|
+
types: [rust]
|
|
20
|
+
pass_filenames: false
|
|
21
|
+
|
|
22
|
+
- id: cargo-check
|
|
23
|
+
name: cargo check
|
|
24
|
+
entry: cargo check --all-targets --all-features
|
|
25
|
+
language: system
|
|
26
|
+
types: [rust]
|
|
27
|
+
pass_filenames: false
|
|
28
|
+
|
|
29
|
+
# General file checks
|
|
30
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
31
|
+
rev: v5.0.0
|
|
32
|
+
hooks:
|
|
33
|
+
- id: trailing-whitespace
|
|
34
|
+
- id: end-of-file-fixer
|
|
35
|
+
- id: check-yaml
|
|
36
|
+
- id: check-toml
|
|
37
|
+
- id: check-added-large-files
|
|
38
|
+
- id: check-merge-conflict
|
|
39
|
+
- id: mixed-line-ending
|