From 9505d6ad4e56a361757bec52305d42a56dfa20b3 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 5 Jun 2024 09:50:26 +0200 Subject: [PATCH 1/2] CI: test for python 3.12 --- .github/workflows/test.yml | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a997232..ed51bc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@main @@ -31,7 +31,7 @@ jobs: python -m pip install --upgrade pip python -m pip install tox - name: Lint with tox - if: matrix.python-version == 3.10 + if: matrix.python-version == 3.12 run: tox -e black,codespell,flake8,lint - name: Test with tox run: | diff --git a/tox.ini b/tox.ini index 0ebce9e..81681be 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint,codespell,flake8,black,{py37,py38,py39,py310,py311}-{test} +envlist = lint,codespell,flake8,black,{py37,py38,py39,py310,py311,py312}-{test} skip_missing_interpreters = true skipsdist = true From 080ea07f0e470aec59d523002850de3c01560160 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 5 Jun 2024 09:57:14 +0200 Subject: [PATCH 2/2] Use 'yield from' to satisfy linter --- check_labels.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/check_labels.py b/check_labels.py index 0a44854..a7c7401 100755 --- a/check_labels.py +++ b/check_labels.py @@ -392,12 +392,10 @@ def remove_from_labels(self, label): ) from exc def get_labels(self): - for label in self.labels: - yield label + yield from self.labels def get_reviews(self): - for review in self.reviews: - yield review + yield from self.reviews @pytest.mark.parametrize( "value, labels, reviews, missing_approvals_label, exp",