From 802b4dd5dd8cefc96bfa54fe6c33e038df5dc3f3 Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Sat, 11 Jan 2025 15:12:09 +1300 Subject: [PATCH 1/2] Add [tool.coverage.report] by default --- src/usethis/_tool.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/usethis/_tool.py b/src/usethis/_tool.py index 6958790..baf9779 100644 --- a/src/usethis/_tool.py +++ b/src/usethis/_tool.py @@ -262,6 +262,19 @@ def get_pyproject_configs(self) -> list[PyProjectConfig]: "omit": ["*/pytest-of-*/*"], }, ), + PyProjectConfig( + id_keys=["tool", "coverage", "report"], + main_contents={ + "exclude_also": [ + "if TYPE_CHECKING:", + "raise AssertionError", + "raise NotImplementedError", + "assert_never(.*)", + "class .*\\bProtocol\\):", + "@(abc\\.)?abstractmethod", + ] + }, + ), ] def get_associated_ruff_rules(self) -> list[str]: From 982fb11b7dc96828cf66ae440e10c40eda956986 Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Sat, 11 Jan 2025 15:17:20 +1300 Subject: [PATCH 2/2] Add logo Add docs for adding badges --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ccf8b21..124e66e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +

+
+

+ # usethis [![PyPI Version]()]() @@ -51,7 +55,7 @@ Add a new tool to a Python project, including: Currently supported tools: -- ruff +- Ruff - pytest - deptry - pre-commit @@ -65,6 +69,15 @@ Supported arguments: - `--remove` to remove the tool instead of adding it - `--offline` to disable network access and rely on caches +### `usethis badge` + +Add badges to READEME.md. + +Currently supported badges: + +- Ruff +- pre-commit + ### `usethis ci` Add Continuous Integration pipelines to the project.