diff --git a/Dockerfile b/Dockerfile index 42793fc..5912e5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ COPY --from=builder /root/.local/lib /root/.local/lib COPY --from=builder /root/.local/bin/mitmdump /root/.local/bin/mitmdump COPY --from=builder /root/.local/bin/mypy /root/.local/bin/mypy ENV PATH=/root/.local/bin:$PATH +COPY mypy.ini . COPY typecheck . COPY src src COPY default-rules default-rules diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..359eae6 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,5 @@ +[mypy] +mypy_path = $MYPY_CONFIG_FILE_DIR/src +explicit_package_bases = True +namespace_packages = True +files = $MYPY_CONFIG_FILE_DIR/src diff --git a/src/modules/__init__.py b/src/modules/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/typecheck b/typecheck index 826d5c2..002e685 100755 --- a/typecheck +++ b/typecheck @@ -4,5 +4,4 @@ set -e export MYPYPATH=/usr/local/lib/python3.6/dist-packages/ -mypy src/*.py --ignore-missing-imports --disallow-untyped-defs --follow-imports skip -mypy src/modules/*.py --ignore-missing-imports --disallow-untyped-defs --follow-imports skip +mypy src/ --config-file mypy.ini --ignore-missing-imports --disallow-untyped-defs