Skip to content

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

@ttw225

Description

@ttw225

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions