--- id: covdefaults version: "2.3.0" license: MIT license_treatment: permissive maintenance: active --- # covdefaults — A coverage plugin to provide sensible default settings License: permissive · Maintenance: active · Downloads: 616.7K/mo ## What it is and what it does covdefaults is a plugin for the coverage tool that injects a curated set of default coverage settings so you don't have to configure them manually. When activated, it sets branch tracking on, establishes a 100% coverage threshold, and pre-defines exclusion rules for common non-testable patterns like `if __name__ == '__main__'`, type-checking blocks, and platform-specific code paths. The plugin also generates automatic pragma tags based on your runtime environment—marking code as excluded if it targets a different platform (Windows vs. Linux) or Python version than the one running tests. You can override or extend any of these defaults in your own coverage configuration; the plugin respects manually set values and allows you to add or subtract from its omit and exclude lists. Use it for: - Enforce 100% branch coverage across a project without manually configuring coverage thresholds and exclusion patterns. - Automatically exclude platform-specific code branches (Windows vs. POSIX, CPython vs. PyPy) from coverage reports. - Skip version-gated code (e.g., Python 3.9+ features) from coverage when testing on older Python versions. - Reduce boilerplate in .coveragerc by inheriting sensible defaults for show_missing, skip_covered, and exclude_lines. - Maintain consistent coverage settings across multiple projects by relying on a shared plugin rather than duplicating configuration. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A coverage plugin that automatically applies sensible default settings for code coverage measurement, including branch tracking, strict thresholds, and platform/version-aware exclusion rules. Yes, if you want strict, opinionated coverage defaults with minimal setup. The plugin is actively maintained, has no known vulnerabilities, and low install friction. It's most valuable for projects that already target 100% coverage or want to enforce it; teams preferring lower thresholds or highly custom exclusion rules may find the defaults constraining and should verify they can override them to your satisfaction. ## Install pip install covdefaults uv add covdefaults poetry add covdefaults ## Installing covdefaults Before you install: Low friction: pure Python wheel with a single runtime dependency on coverage. Actively maintained as of 2026-07-15 with 87 repository stars. License in practice: MIT license permits commercial and private use with minimal restrictions; you must retain the license notice in distributions. Quickstart: pip install covdefaults Then add to .coveragerc, setup.cfg, or pyproject.toml: [coverage:run] plugins = covdefaults The plugin activates automatically when coverage runs. Requires coverage to be installed and configured; the plugin only applies defaults when coverage is invoked. Verify before relying: - Whether the plugin's default fail_under = 100 threshold is appropriate for typical project workflows. - How the plugin interacts with existing coverage configuration when both defaults and user settings overlap. - Performance impact when processing platform and version-specific pragma tags on large codebases. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 616.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags coverage plugin defaults, code coverage configuration, coverage settings automation, branch coverage tracking, coverage threshold enforcement, platform-specific coverage exclusions, coverage report configuration, coverage-plugin, testing-automation [View on SkillFed](https://skillfed.io/packages/covdefaults) · [View on PyPI](https://pypi.org/project/covdefaults/)