Skip to content

Adds WPS242 which forbids to have too many cases in match block#3218

Merged
sobolevn merged 4 commits intowemake-services:masterfrom
pojknamn:issue-3202
Dec 24, 2024
Merged

Adds WPS242 which forbids to have too many cases in match block#3218
sobolevn merged 4 commits intowemake-services:masterfrom
pojknamn:issue-3202

Conversation

@pojknamn
Copy link
Copy Markdown
Contributor

I have made things!

Checklist

  • I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
  • I have created at least one test case for the changes I have made
  • I have updated the documentation for the changes I have made
  • I have added my changes to the CHANGELOG.md

Related issues

@pojknamn pojknamn changed the title add max match cases rule Adds WPS242 which forbids to have too many cases in match block Dec 24, 2024
@pojknamn pojknamn changed the title Adds WPS242 which forbids to have too many cases in match block Adds WPS242 which forbids to have too many cases in match block Dec 24, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (aa7b453) to head (c6be827).
Report is 128 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3218   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          367       368    +1     
  Lines        12370     12407   +37     
  Branches       865       866    +1     
=========================================
+ Hits         12370     12407   +37     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Just one comment from my side :)

Comment thread tests/test_checker/test_noqa.py Outdated
'WPS239': 1,
'WPS240': 0, # only triggers on 3.12+
'WPS241': 1,
'WPS242': 0,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, add at least one to noqa.py. we need this to:

  • make sure that noqa works for the correct node
  • the whole integration process worked

Copy link
Copy Markdown
Contributor Author

@pojknamn pojknamn Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i`ve missed that, sorry.
Fixed ( doesn't really fixed yet)

Comment thread wemake_python_styleguide/options/defaults.py Outdated
Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@sobolevn sobolevn merged commit a63be9d into wemake-services:master Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complexity: find PM with too many case statements

2 participants