Skip to content
Snippets Groups Projects
Commit c232f747 authored by dx's avatar dx
Browse files

ci: remove mypy

After so many wasted development hours we've decided to say fuck it.
parent a74b4742
No related branches found
No related tags found
1 merge request!228ci: remove mypy
Pipeline #7357 passed
......@@ -21,21 +21,6 @@ clang-tidy:
reports:
codequality: cqual.json
mypy:
stage: check
variables:
MYPYPATH: python_payload/mypystubs
script:
- "set +e +o pipefail"
- "bash tools/mypy.sh; result=$?"
- "python3 tools/codequal-report.py mypy warnings.txt > cqual.json"
- "set -e -o pipefail"
- "[ $result == 0 ]"
artifacts:
when: always
reports:
codequality: cqual.json
format:
stage: check
script:
......
......@@ -70,8 +70,6 @@ For running the simulator, you'll need Python 3 with pygame and wasmer:
venv/bin/pip install https://flow3r.garden/tmp/wasmer-py311/wasmer_compiler_cranelift-1.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
venv/bin/pip install https://flow3r.garden/tmp/wasmer-py311/wasmer-1.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
For Python development, you're also encouraged to use mypy for typechecks. It should be available in your distribution repositories.
On macOS: the above might work.
On Windows: good luck.
......@@ -93,12 +91,6 @@ As with application development, you can first check your changes using the simu
$ python3 sim/run.py
You should also run typechecks:
::
$ MYPYPATH=python_payload/mypystubs mypy python_payload/main.py
Working on C st3m code
----------------------
......
#!/usr/bin/env bash
set -e -u
if [ ! -f sdkconfig.defaults ] || [ ! -f recovery/sdkconfig.defaults ]; then
echo >/dev/stderr "Run this script for the root of the repository (ie. tools/mypy.sh)."
exit 1
fi
export MYPYPATH=$(pwd)/python_payload/mypystubs:$(pwd)/python_payload
echo "Checking st3m..."
_CI="${CI:-}"
if [ ! -z "${_CI}" ]; then
: > warnings.txt
fi
failed=""
function _mypy() {
if [ ! -z "${_CI}" ]; then
mypy "$1" --strict --no-color-output >> warnings.txt || failed=true
else
mypy "$1" --strict || failed=true
fi
}
_mypy python_payload/main.py
for f in python_payload/apps/*/flow3r.toml; do
app_name="$(basename $(dirname $f))"
echo "Checking ${app_name}..."
_mypy python_payload/apps/${app_name}
done
if [ $failed ]; then
echo "Failed"
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment