Skip to content

Report unnecessary pragma: no cover comments #1666

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

Merged
merged 8 commits into from
May 9, 2025
Merged

Conversation

samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented May 8, 2025

This causes # pragma: no cover comments which are unnecessary (where some of the relevant lines are actually covered) to be reported as an error.

For cases with flakey coverage or partial coverage on code, use # pragma: lax no cover which will not error if some relevant lines are covered.

Copy link

github-actions bot commented May 8, 2025

Docs Preview

commit: 2461e96
Preview URL: https://e0a8d38a-pydantic-ai-previews.pydantic.workers.dev

@samuelcolvin samuelcolvin changed the title wrong coverage Report unnecessary pragma: no cover comments May 9, 2025
@samuelcolvin samuelcolvin merged commit 7364f00 into main May 9, 2025
18 checks passed
@samuelcolvin samuelcolvin deleted the wrong-coverage branch May 9, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants