Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
chore: add Pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
seanwu1105 committed Nov 3, 2022
1 parent a1c2c9b commit 6fdf9fb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ jobs:
run: |
poetry run python -m pylint **/*.py --errors-only
poetry run python -m black **/*.py --check
- uses: jakebailey/pyright-action@v1
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ repos:
- id: black
stages: [commit]

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.278
hooks:
- id: pyright
stages: [commit]

- repo: https://github.com/commitizen-tools/commitizen
rev: v2.34.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
"python.defaultInterpreterPath": "./.venv/bin/python",
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true
Expand Down
Empty file added main.py
Empty file.
13 changes: 13 additions & 0 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"venvPath": ".",
"venv": ".venv",
"typeCheckingMode": "strict",
"useLibraryCodeForTypes": true,
"reportCallInDefaultInitializer": "warning",
"reportImplicitStringConcatenation": "warning",
"reportMissingSuperCall": "warning",
"reportPropertyTypeMismatch": "warning",
"reportUninitializedInstanceVariable": "warning",
"reportUnnecessaryTypeIgnoreComment": "warning",
"reportUnusedCallResult": "warning"
}

0 comments on commit 6fdf9fb

Please sign in to comment.