Skip to content

Commit

Permalink
Merge pull request #9030 from mozilla/add-pyright-type-checking
Browse files Browse the repository at this point in the history
Add pyright type checking
  • Loading branch information
tbrlpld authored Jul 5, 2022
2 parents 97d0a2c + 6fa9439 commit f77dafd
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
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"
}

0 comments on commit f77dafd

Please sign in to comment.