From 11155b494c0aa4c5c3193604e0e5013e2ffa29c4 Mon Sep 17 00:00:00 2001 From: Colin Gravill <1099725+cgravill@users.noreply.github.com> Date: Thu, 22 Jul 2021 16:33:46 +0100 Subject: [PATCH] Use pyproject.toml for mypy and specify files (#969) * Move mypy to pyproject.toml * Mypy files config in pyproject.toml so more easily used --- .github/workflows/pythonchecks.yml | 2 +- mypy.ini | 3 --- pyproject.toml | 5 +++++ 3 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 mypy.ini diff --git a/.github/workflows/pythonchecks.yml b/.github/workflows/pythonchecks.yml index cfc045900..a1ec9def7 100644 --- a/.github/workflows/pythonchecks.yml +++ b/.github/workflows/pythonchecks.yml @@ -42,7 +42,7 @@ jobs: - name: Tiny bit of type-checking with mypy run: | - mypy --follow-imports=silent src/python/ksc/torch_frontend.py src/python/ksc/type.py src/python/ksc/expr.py src/python/ksc/filter_term.py + mypy --follow-imports=silent - name: Dependency Detection setup uses: actions/checkout@v2 diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 32082388f..000000000 --- a/mypy.ini +++ /dev/null @@ -1,3 +0,0 @@ -[mypy] -python_version=3.8 -ignore_missing_imports=true diff --git a/pyproject.toml b/pyproject.toml index 6f7372c65..f0eb38f0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,8 @@ [tool.black] # current releleased version of Black doesn't have extend-exclude, so add pybind11 and mlir to default extend until released exclude = '/(\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist|pybind11|mlir|users|llvm-project)/' + +[tool.mypy] +python_version=3.8 +ignore_missing_imports=true +files="src/python/ksc/torch_frontend.py, src/python/ksc/type.py, src/python/ksc/expr.py, src/python/ksc/filter_term.py"