From 93819246fc6de1d1eb165123016dc31d57b374b2 Mon Sep 17 00:00:00 2001 From: David Mandelberg Date: Sat, 23 Sep 2023 00:48:55 -0400 Subject: [PATCH] Run pytype --- .github/workflows/test.yaml | 6 ++++++ pyproject.toml | 7 +++++++ requirements.txt | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5c96949..70ec79d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -51,6 +51,12 @@ jobs: run: | pip install black black --check --diff . + - name: Check types + # TODO(https://github.com/google/pytype/issues/1308): Remove condition. + if: matrix.python-version != '3.11' + run: | + pip install pytype + pytype - name: Test run: | pip install pytest pytest-cov diff --git a/pyproject.toml b/pyproject.toml index c9d7bc8..83c19d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,13 @@ addopts = """\ --cov-report=term-missing \ """ +[tool.pytype] +inputs = ["rock_paper_sand"] +exclude = [ + "**/*_pb2.py", +] +jobs = "auto" + [tool.setuptools-protobuf] protobufs = [ "rock_paper_sand/proto/config.proto", diff --git a/requirements.txt b/requirements.txt index 318d88e..56b5309 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,5 +6,5 @@ python-dateutil pyyaml requests setuptools -setuptools-protobuf +setuptools-protobuf[mypy] urllib3