From b6e607f60e852b33b79c90a60c46dd7ccdec59dd Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Tue, 14 Feb 2023 10:26:05 +0100 Subject: [PATCH] ci: ignore syntax, type checking for protobuf generated files --- .github/mypy/mypy.ini | 3 +++ .github/workflows/tests.yml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/mypy/mypy.ini b/.github/mypy/mypy.ini index c80af3de..1822c0ae 100644 --- a/.github/mypy/mypy.ini +++ b/.github/mypy/mypy.ini @@ -1,4 +1,7 @@ [mypy] +exclude = (?x)( + _pb2\.py$ # protobuf generated files + ) [mypy-halo.*] ignore_missing_imports = True diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e60eb4e5..ea5eb30c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,9 +34,9 @@ jobs: - name: Install dependencies run: pip install -e .[dev] - name: Lint with isort - run: isort --profile black --length-sort --line-width 120 -c . + run: isort --profile black --length-sort --line-width 120 --skip-glob "*_pb2.py" -c . - name: Lint with black - run: black -l 120 --check . + run: black -l 120 --extend-exclude ".*_pb2.py" --check . - name: Lint with pycodestyle run: pycodestyle --show-source capa/ scripts/ tests/ - name: Check types with mypy