commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

Consider excluding pure typing modules from coverage (question.py)

Open ttw225 opened this issue 8 months ago • 1 comments

Description

Context

commitizen/question.py is mostly a typing module. It defines question-related structures using TypedDict, Literal, unions, and callable type hints.

Question

Should we exclude this file from coverage?

Steps to reproduce

uv run poe cover

Current behavior

Name                                                         Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------------------
commitizen/question.py                                           7      7     0%   1-41

Desired behavior

My view:

I lean toward excluding commitizen/question.py from coverage, since its value is mostly in static typing rather than runtime behavior.

We can add commitizen/question.py to the coverage omit list in pyproject.toml.

Screenshots

No response

Environment

Commitizen Version: 4.13.9 Python Version: 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 15.0.0 (clang-1500.1.0.2.5)] Operating System: Darwin

ttw225 avatar Mar 19 '26 06:03 ttw225

Sounds good.

bearomorphism avatar May 10 '26 03:05 bearomorphism