Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyright type checking #9030

Merged
merged 6 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ jobs:
- name: Coveralls
run: coveralls
continue-on-error: true
- name: PyRight
run: npm run pyright
continue-on-error: true

test_percy:
name: Percy CI
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ services:
volumes:
- .:/app:delegated
- node_modules:/app/node_modules/:delegated
- dockerpythonvenv:/app/dockerpythonvenv/:delegated
depends_on:
- backend

Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"playwright:ci": "run-p --race server playwright:integration",
"playwright:integration": "wait-on -i 3000 http://localhost:8000/cms && playwright test ./tests/integration.spec.js",
"precommit": "npm run test",
"pyright": "pyright",
"server": "python network-api/manage.py runserver 0.0.0.0:8000",
"server:silent": "python network-api/manage.py runserver 0.0.0.0:8000 >> server.log 2>&1",
"start": "docker-compose up",
Expand Down Expand Up @@ -114,6 +115,7 @@
"eslint-plugin-react": "^7.25.1",
"optipng-bin": "^7.0.0",
"prettier": "^2.3.2",
"pyright": "^1.1.256",
"stylelint": "^13.13.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-prettier": "^1.2.0",
Expand Down
16 changes: 16 additions & 0 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"include": [
"network-api/networkapi"
],
"exclude": [
"**/node_modules",
"**/__pycache__",
"**/migrations"
],
"extraPaths": [
"./dockerpythonvenv/lib/python3.9/site-packages/"
],
"venvPath": "dockerpythonvenv",
"pythonVersion": "3.9",
"pythonPlatform": "Linux"
}