Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [tool.coverage.report] by default #159

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<h1 align="center">
<img src="doc/logo.svg"><br>
</h1>

# usethis

[![PyPI Version](<https://img.shields.io/pypi/v/usethis.svg>)](<https://pypi.python.org/pypi/usethis>)
Expand Down Expand Up @@ -51,7 +55,7 @@ Add a new tool to a Python project, including:

Currently supported tools:

- ruff
- Ruff
- pytest
- deptry
- pre-commit
Expand All @@ -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.
Expand Down
13 changes: 13 additions & 0 deletions src/usethis/_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
Loading