You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4f86b1c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,10 @@ GitHub action for [pyright](https://github.com/microsoft/pyright). Featuring:
22
22
inputs:
23
23
# Options for pyright-action
24
24
version:
25
-
description: 'Version of pyright to run. If not specified, the latest version will be used.'
25
+
description: 'Version of pyright to run. If neither version nor pylance-version are specified, the latest version will be used.'
26
+
required: false
27
+
pylance-version:
28
+
description: 'Version of pylance whose pyright version should be run. Can be latest-release, latest-prerelease, or a specific pylance version. Ignored if version option is specified.'
26
29
required: false
27
30
working-directory:
28
31
description: 'Directory to run pyright in. If not specified, the repo root will be used.'
@@ -132,3 +135,23 @@ poetry's python binary is on `$PATH`:
132
135
133
136
- uses: jakebailey/pyright-action@v1
134
137
```
138
+
139
+
## Keeping Pyright and Pylance in sync
140
+
141
+
If you use Pylance as your language server, you'll likely want pyright-action to
142
+
use the same version of `pyright` that Pylance does. The `pylance-version`
143
+
option makes this easy.
144
+
145
+
If you allow VS Code to auto-update Pylance, then set `pylance-version` to
146
+
`latest-release`if you use Pylance's Release builds, or `latest-prerelease` if
147
+
you use Pylance's Pre-Release builds. Alternatively, you can set it to a
148
+
particular Pylance version number (ex. `2023.11.11`).
149
+
150
+
Note that the `version` option takes precedence over `pylance-version`, so
Copy file name to clipboardExpand all lines: action.yml
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,10 @@ branding:
8
8
inputs:
9
9
# Options for pyright-action
10
10
version:
11
-
description: 'Version of pyright to run. If not specified, the latest version will be used.'
11
+
description: 'Version of pyright to run. If neither version nor pylance-version are specified, the latest version will be used.'
12
+
required: false
13
+
pylance-version:
14
+
description: 'Version of pylance whose pyright version should be run. Can be latest-release, latest-prerelease, or a specific pylance version. Ignored if version option is specified.'
12
15
required: false
13
16
working-directory:
14
17
description: 'Directory to run pyright in. If not specified, the repo root will be used.'
0 commit comments