Commit 0c8fb9c
Pyright Configuration for CI Pipeline (#2267)
Discussed with Pokey at Cursorless meetup last weekend about Pyright CI.
Posting this here as a discussion to evaluate if Pyright is useful for
Cursorless in its CI pipeline.
### Downside for Pyright integration
- Since we can't install Talon in CI, we essentially have to ignore all
Talon typing and imports unless we import typing stubs or something
analogous
```
error: Import "talon" could not be resolved (reportMissingImports)
```
- Talon scripting with Python has development patterns that deviate from
the norm so we have to ignore some errors similar to the following
```
error: Type of parameter "key" must be a supertype of its class "Actions" (reportGeneralTypeIssues)
```
- Not entirely sure why you can't get around the "type of parameter X
must be a supertype" but since it throws an error you essentially have
to disable all `reportGeneralTypeIssues` to get rid of it.
- submitted issue to microsoft/pyright#7513
### Current Config
```toml
[tool.pyright]
# Talon classes don't use self so ignore the associated errors
reportSelfClsParameterName = false
# Talon can't be installed in CI so ignore source errors
reportMissingModuleSource = false
reportMissingImports = false
```
May or may not want the following
```
# Ignore the type of parameter X must be a supertype of its class
# reportGeneralTypeIssues = false
```
---------
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>1 parent 006ea15 commit 0c8fb9c
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | 7 | | |
3 | 8 | | |
| |||
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
0 commit comments