Skip to content

Commit 346f1cf

Browse files
committed
Avoid pyright bugs on windows
1 parent 2cf424c commit 346f1cf

File tree

3 files changed

+37
-16
lines changed

3 files changed

+37
-16
lines changed

.github/workflows/code-checks.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Code Checks
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
10+
jobs:
11+
pre-commit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.11"
18+
cache: 'pip'
19+
- uses: pre-commit/[email protected]
20+
- uses: pre-commit-ci/[email protected]
21+
if: always()
22+
- uses: jakebailey/pyright-action@v1

.pre-commit-config.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
ci:
3-
# Replace use some hooks of pre-commit.ci with our own github actions.
4-
# See https://github.com/pre-commit-ci/issues/issues/55.
5-
skip: ['pyright']
3+
autofix_prs: false
64
repos:
75
- repo: local
86
hooks:
@@ -109,16 +107,16 @@ repos:
109107
- id: python-no-log-warn
110108
- id: python-use-type-annotations
111109

112-
- repo: local
113-
hooks:
114-
- id: pyright
115-
name: pyright
116-
entry: pyright
117-
language: python
118-
pass_filenames: false
119-
types: [python]
120-
additional_dependencies:
121-
- PyQt6
122-
- darkdetect
123-
- pytest
124-
- pytest-qt
110+
# This hook has bug on Windows.
111+
# See https://github.com/RobertCraigie/pyright-python/issues/45
112+
# Run pyright with GitHub actions until this bug is resolved.
113+
114+
# - repo: https://github.com/RobertCraigie/pyright-python
115+
# rev: v1.1.279
116+
# hooks:
117+
# - id: pyright
118+
# additional_dependencies:
119+
# - PyQt6
120+
# - darkdetect
121+
# - pytest
122+
# - pytest-qt

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"filecmp",
3737
"icccm",
3838
"isort",
39+
"jakebailey",
3940
"jsonschema",
4041
"keysyms",
4142
"libegl",

0 commit comments

Comments
 (0)