From a24d07fd2dfd8e30212426288e7c388075028286 Mon Sep 17 00:00:00 2001 From: Saurav Maheshkar Date: Tue, 17 Sep 2024 10:36:09 +0100 Subject: [PATCH] chore: migrate coverage cfg to pyproject.toml (#32650) chore: move coverage cfg to pyproject --- .coveragerc | 12 ------------ pyproject.toml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 12 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 9a1103b8af3d01..00000000000000 --- a/.coveragerc +++ /dev/null @@ -1,12 +0,0 @@ -[run] -source=transformers -omit = - # skip convertion scripts from testing for now - */convert_* - */__main__.py -[report] -exclude_lines = - pragma: no cover - raise - except - register_parameter \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9bf76d819548d3..bf78e0174394f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,18 @@ +[tool.coverage.run] +source = ["transformers"] +omit = [ + "*/convert_*", + "*/__main__.py" +] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "raise", + "except", + "register_parameter" +] + [tool.ruff] line-length = 119