From 5636626700830e05e8e99d51b9935d411920c5d5 Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Sun, 29 Nov 2026 13:27:03 +0200 Subject: [PATCH 1/2] Fix Codecov workflow Python setup --- .github/workflows/codecov.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index ac4f623e7..6c1e7db77 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -8,16 +8,16 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] env: OS: ${{ matrix.os }} - PYTHON: '3.8' + PYTHON: '3.10' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Download with submodules with: submodules: recursive - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: ${{ env.PYTHON }} - name: Install dependencies run: | python -m pip install --upgrade pip From e5e40b39f6eae9a13e80596f709ba11c830eac4c Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Sun, 29 Nov 2026 14:11:20 +0200 Subject: [PATCH 2/2] Exclude intentional pattern-matching failure guards from coverage --- tests/test_pattern_matching.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/test_pattern_matching.py b/tests/test_pattern_matching.py index ef66ae37c..cd5063acf 100644 --- a/tests/test_pattern_matching.py +++ b/tests/test_pattern_matching.py @@ -13,35 +13,35 @@ def test_matches_with_string(self): match self.token: case 'a': pass - case _: + case _: # pragma: no cover assert False def test_matches_with_str_positional_arg(self): match self.token: case str('a'): pass - case _: + case _: # pragma: no cover assert False def test_matches_with_token_positional_arg(self): match self.token: - case Token('a'): + case Token('a'): # pragma: no cover assert False case Token('A'): pass - case _: + case _: # pragma: no cover assert False def test_matches_with_token_kwarg_type(self): match self.token: case Token(type='A'): pass - case _: + case _: # pragma: no cover assert False def test_matches_with_bad_token_type(self): match self.token: - case Token(type='B'): + case Token(type='B'): # pragma: no cover assert False case _: pass @@ -55,25 +55,25 @@ def test_match_on_tree(self): ]) match tree1: - case Tree('X', []): + case Tree('X', []): # pragma: no cover assert False - case Tree('a', []): + case Tree('a', []): # pragma: no cover assert False - case Tree(_, 'b'): + case Tree(_, 'b'): # pragma: no cover assert False - case Tree('X', _): + case Tree('X', _): # pragma: no cover assert False tree = Tree('q', [Token('T', 'x')]) match tree: case Tree('q', [Token('T', 'x')]): pass - case _: + case _: # pragma: no cover assert False tr = Tree('a', [Tree('b', [Token('T', 'a')])]) match tr: case Tree('a', [Tree('b', [Token('T', 'a')])]): pass - case _: + case _: # pragma: no cover assert False # test nested trees match tree2: @@ -88,7 +88,7 @@ def test_match_on_tree(self): ]) ]): pass - case _: + case _: # pragma: no cover assert False