Skip to content

Commit

Permalink
add run-mypy.sh, run-pylint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Apr 19, 2024
1 parent 834b736 commit 67f07ab
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
build_py_project_in_conda_env
python -m pip install mypy importlib-resources
python -m mypy --show-error-codes pyopencl test
./run-mypy.sh
pytest:
name: Pytest Linux POCL
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ wheelhouse

memray-*.bin
memray-*.html

.pylintrc.yml
.run-pylint.py
3 changes: 3 additions & 0 deletions run-mypy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash

python -m mypy pyopencl test
23 changes: 23 additions & 0 deletions run-pylint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -o errexit -o nounset

ci_support="https://gitlab.tiker.net/inducer/ci-support/raw/main"

if [[ ! -f .pylintrc.yml ]]; then
curl -o .pylintrc.yml "${ci_support}/.pylintrc-default.yml"
fi


if [[ ! -f .run-pylint.py ]]; then
curl -L -o .run-pylint.py "${ci_support}/run-pylint.py"
fi


PYLINT_RUNNER_ARGS="--jobs=4 --yaml-rcfile=.pylintrc.yml"

if [[ -f .pylintrc-local.yml ]]; then
PYLINT_RUNNER_ARGS+=" --yaml-rcfile=.pylintrc-local.yml"
fi

python .run-pylint.py $PYLINT_RUNNER_ARGS $(basename $PWD) test/*.py "$@"

0 comments on commit 67f07ab

Please sign in to comment.