From 837d82b966afa59efedd44b71cb7fbcc84250caf Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt Date: Fri, 25 Oct 2024 18:12:47 +0800 Subject: [PATCH] :wrench: update coveragerc --- .coveragerc | 4 ++-- nepattern/func.py | 2 +- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.coveragerc b/.coveragerc index 97cb9ea..c5b46e6 100644 --- a/.coveragerc +++ b/.coveragerc @@ -2,9 +2,9 @@ branch = True source = . omit = - ./exam.py + ./exam*.py ./test.py - ./nepattern/context.pyi + ./nepattern/func.py ./nepattern/*.pyi [report] diff --git a/nepattern/func.py b/nepattern/func.py index 20f5999..bc89103 100644 --- a/nepattern/func.py +++ b/nepattern/func.py @@ -233,7 +233,7 @@ def GetItem( def match(self, input_) -> T: try: return _match(input_)[key] - except Exception as e: + except Exception as e: # pragma: no cover if default is not None: return default raise e diff --git a/pyproject.toml b/pyproject.toml index 6093492..b18d2ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ test = {composite = ["coverage run -m pytest -vv", "coverage xml", "coverage rep [tool.coverage.run] branch = true source = ["."] -omit = ["test.py", "./nepattern/context.pyi"] +omit = ["test.py", "./nepattern/*.pyi", "./nepattern/func.py"] [tool.coverage.report]