Skip to content

Conversation

@HankyStyle
Copy link
Contributor

@HankyStyle HankyStyle commented Jan 31, 2026

Description

This PR addresses ruff rule PT030 ("pytest.warns() is too broad") in the test suite.

Before
image

After
image

Checklist

Was generative AI tooling used to co-author this PR?

  • Yes (gemini 3 pro)

Code Changes

  • Add test cases to all the changes you introduce
  • 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
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Expected Behavior

  • Use pytest.warns(DeprecationWarning, match=r".*--version-type.*deprecated") instead of a generic catch.
  • Running uv run ruff check should pass without PT030 errors.
  • The tests should correctly identify and match the "version-type is deprecated" warning.

Steps to Test This Pull Request

  1. Run linting check to ensure PT030 is resolved:
    uv run ruff check

Additional Context

@bearomorphism bearomorphism merged commit ef78ba4 into commitizen-tools:next-release Jan 31, 2026
18 checks passed
bearomorphism pushed a commit that referenced this pull request Jan 31, 2026
Co-authored-by: 余翰承 <hankyu@yuhanchengdeMacBook-Air.local>
@bearomorphism
Copy link
Collaborator

btw this should be test, not fix

I just fixed it in the release branch

@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.98%. Comparing base (dd2dcca) to head (0af3a4e).
⚠️ Report is 4 commits behind head on next-release.

Additional details and impacted files
@@               Coverage Diff                @@
##           next-release    #1828      +/-   ##
================================================
+ Coverage         97.97%   97.98%   +0.01%     
================================================
  Files                60       60              
  Lines              2667     2681      +14     
================================================
+ Hits               2613     2627      +14     
  Misses               54       54              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants