Title: test(coverage): omit pure typing module commitizen/question.py by bearomorphism · Pull Request #1988 · commitizen-tools/commitizen · GitHub
Open Graph Title: test(coverage): omit pure typing module commitizen/question.py by bearomorphism · Pull Request #1988 · commitizen-tools/commitizen
X Title: test(coverage): omit pure typing module commitizen/question.py by bearomorphism · Pull Request #1988 · commitizen-tools/commitizen
Description: Description Excludes commitizen/question.py from coverage reporting by adding it to the [tool.coverage.report].omit list in pyproject.toml. commitizen/question.py defines TypedDicts (Choice, ListQuestion, InputQuestion, ConfirmQuestion), Literal discriminators, and the CzQuestion union — pure static-typing constructs with no runtime code paths to exercise. Coverage therefore reports the file as 0%, which is misleading: the lines do not represent untested logic, they represent type definitions whose only consumers are type checkers. How Add ''commitizen/question.py'' to the omit list under [tool.coverage.report] in pyproject.toml. Why Removes a misleading 0% coverage row for a file that has no runtime behavior to test. Aligns the coverage report with the file''s actual purpose (typing-only). Discussed in #1904 and agreed there. What One-line addition to pyproject.toml. No source/test code changes. Verification Ran uv run poe cover locally; commitizen/question.py no longer appears in the coverage report. TOTAL coverage rises from the previous baseline accordingly (now 99%). Ran uv run poe lint — ruff check and mypy both pass. Ran uv run poe format — no files changed. Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Generated-by: GitHub Copilot CLI (Claude Opus 4.7) following the guidelines Code Changes Add test cases to all the changes you introduce — N/A (configuration-only change to coverage tool) Run uv run poe all locally to ensure this change passes linter check and tests Manually test the changes: Verify the feature/bug fix works as expected in real-world scenarios — confirmed question.py is no longer reported by uv run poe cover Test edge cases and error conditions — N/A Ensure backward compatibility is maintained — coverage tool config only; no runtime impact Document any manual testing steps performed — see Steps to Test below Update the documentation for the changes — N/A (no user-facing behavior change) Documentation Changes N/A. Expected Behavior After this change, uv run poe cover no longer lists commitizen/question.py as 0% covered, because it is excluded from the coverage report along with the other entries in the omit list. Steps to Test This Pull Request uv sync --frozen --group base --group test --group linters uv run poe cover Confirm that commitizen/question.py does not appear in the coverage report (previously it appeared as 7 7 0%). Additional Context Closes #1904.
Open Graph Description: Description Excludes commitizen/question.py from coverage reporting by adding it to the [tool.coverage.report].omit list in pyproject.toml. commitizen/question.py defines TypedDicts (Choice, ListQu...
X Description: Description Excludes commitizen/question.py from coverage reporting by adding it to the [tool.coverage.report].omit list in pyproject.toml. commitizen/question.py defines TypedDicts (Choice, ListQu...
Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/1988
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:58eb9a6a-b222-5794-8e99-3eafefd22587 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B122:10E65B:1C0A6F9:25CF31C:6A506D98 |
| html-safe-nonce | 9f388ba3bd347ec23c6a9e284c6c67fc660bb0b26dbc1f437f11c715f00d4c27 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTIyOjEwRTY1QjoxQzBBNkY5OjI1Q0YzMUM6NkE1MDZEOTgiLCJ2aXNpdG9yX2lkIjoiNDk0NDM5MjAyMzk1ODM4NDAyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2e01b5ce06719b79d29837765323bbe3de47369b399c7a25a7ebce91a386745a |
| hovercard-subject-tag | pull_request:3656422586 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/commitizen-tools/commitizen/pull/1988/files |
| twitter:image | https://avatars.githubusercontent.com/u/26526132?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/26526132?s=400&v=4 |
| og:image:alt | Description Excludes commitizen/question.py from coverage reporting by adding it to the [tool.coverage.report].omit list in pyproject.toml. commitizen/question.py defines TypedDicts (Choice, ListQu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width