From 6ae427cd40bf536d5fe604aa292e53aca22e4ed0 Mon Sep 17 00:00:00 2001 From: "hypothesis-github-app[bot]" <121194500+hypothesis-github-app[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:37:04 +0200 Subject: [PATCH] Apply updates from cookiecutter (#32) This automated commit applies the latest updates from our cookiecutters [1] to this repo. [1]: https://github.com/hypothesis/cookiecutters Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 10 ++++++++++ Makefile | 2 +- pyproject.toml | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3369792..ff1d90a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,16 @@ jobs: python-version: '3.10' - run: python -m pip install 'tox<4' - run: tox -e lint + Typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - run: python -m pip install 'tox<4' + - run: tox -e typecheck Tests: runs-on: ubuntu-latest strategy: diff --git a/Makefile b/Makefile index f504d8c..5876470 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ functests-py37: python $(call help,make sure,"make sure that the formatting$(comma) linting and tests all pass") sure: python sure: - @pyenv exec tox --parallel -qe 'checkformatting,lint,tests,py{39,38,37}-tests,coverage,functests,py{39,38,37}-functests' + @pyenv exec tox --parallel -qe 'checkformatting,lint,typecheck,tests,py{39,38,37}-tests,coverage,functests,py{39,38,37}-functests' .PHONY: template $(call help,make template,"update from the latest cookiecutter template") diff --git a/pyproject.toml b/pyproject.toml index a04b28e..74ce7b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -139,6 +139,24 @@ good-names = [ output-format = "colorized" score = "no" +[tool.mypy] +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +disable_error_code = [ + # https://mypy.readthedocs.io/en/stable/error_code_list.html#code-import-untyped + "import-untyped", +] + +[[tool.mypy.overrides]] +module= [ + # Don't try to typecheck the tests for now + "tests.*", +] +ignore_errors = true + + [tool.hdev] project_name = "tox-envfile" project_type = "library"