2019-12-08 22:43:49 +01:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
declare -a arr=(
|
|
|
|
"api"
|
2020-11-06 20:05:40 +01:00
|
|
|
"afputils"
|
2019-12-08 22:43:49 +01:00
|
|
|
"arcutils"
|
2022-11-13 17:56:59 +01:00
|
|
|
"assetparse"
|
2019-12-08 22:43:49 +01:00
|
|
|
"bemanishark"
|
|
|
|
"binutils"
|
|
|
|
"cardconvert"
|
|
|
|
"dbutils"
|
|
|
|
"frontend"
|
|
|
|
"ifsutils"
|
|
|
|
"iidxutils"
|
2022-10-15 20:56:30 +02:00
|
|
|
"jsx"
|
2019-12-08 22:43:49 +01:00
|
|
|
"proxy"
|
|
|
|
"psmap"
|
|
|
|
"read"
|
|
|
|
"replay"
|
|
|
|
"responsegen"
|
2022-10-15 20:56:30 +02:00
|
|
|
"sampleclient"
|
2019-12-08 22:43:49 +01:00
|
|
|
"scheduler"
|
|
|
|
"services"
|
|
|
|
"struct"
|
|
|
|
"trafficgen"
|
|
|
|
"twodxutils"
|
|
|
|
)
|
|
|
|
|
|
|
|
declare -a cmdline=()
|
|
|
|
|
|
|
|
for project in "${arr[@]}"
|
|
|
|
do
|
|
|
|
cmdline+=('-m')
|
|
|
|
cmdline+=("bemani.utils.$project")
|
|
|
|
done
|
|
|
|
|
2021-08-19 21:20:13 +02:00
|
|
|
for test in `find bemani/tests/ -name "test_*.py" | sed 's,.*/,,' | sed 's,\.py,,'`
|
|
|
|
do
|
|
|
|
cmdline+=('-m')
|
|
|
|
cmdline+=("bemani.tests.$test")
|
|
|
|
done
|
|
|
|
|
2019-12-08 22:43:49 +01:00
|
|
|
MYPYPATH=$(python -c "import os; print(os.path.realpath('.'))") mypy \
|
|
|
|
"${cmdline[@]}" \
|
|
|
|
--warn-redundant-casts \
|
2021-05-31 20:07:03 +02:00
|
|
|
--warn-unused-ignores \
|
2021-08-20 20:10:07 +02:00
|
|
|
--warn-unused-configs \
|
|
|
|
--warn-unreachable \
|
2019-12-08 22:43:49 +01:00
|
|
|
--disallow-untyped-calls \
|
|
|
|
--disallow-untyped-defs \
|
2021-05-31 20:07:03 +02:00
|
|
|
--disallow-subclassing-any \
|
|
|
|
--disallow-incomplete-defs \
|
2021-08-20 20:10:07 +02:00
|
|
|
--disallow-untyped-decorators \
|
|
|
|
--check-untyped-defs \
|
|
|
|
--strict-equality \
|
|
|
|
--no-implicit-reexport \
|
2021-05-31 20:07:03 +02:00
|
|
|
--no-implicit-optional \
|
2019-12-08 22:43:49 +01:00
|
|
|
--no-strict-optional
|
2021-08-20 20:10:07 +02:00
|
|
|
|
|
|
|
# Currently we are missing the following options to make us "strict":
|
|
|
|
# --disallow-any-generics - Currently impossible to type certain generics such as Callable.
|
|
|
|
# --warn-return-any - This finds a lot of code that we know is correct but mypy can't prove, not worth it.
|
|
|
|
# We also would want to get rid of the following options:
|
|
|
|
# --no-strict-optional - We have a lot of code that doesn't check but should check for optional.
|