Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add WPS356 violation related to unneccessary iterable unpacking #1124

Merged
merged 5 commits into from
Jan 26, 2020

Conversation

skarzi
Copy link
Collaborator

@skarzi skarzi commented Jan 26, 2020

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

Closes: #1101

🙏 Please, if you or your company is finding wemake-python-styleguide valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/wemake-python-styleguide. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.

@coveralls
Copy link

coveralls commented Jan 26, 2020

Pull Request Test Coverage Report for Build 2520

  • 20 of 20 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 2518: 0.0%
Covered Lines: 5093
Relevant Lines: 5093

💛 - Coveralls

Copy link
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! As always, great job!

@@ -50,9 +48,7 @@ def test_augmented_assign(
@pytest.mark.parametrize('code', [
'a = a {0} b',
])
@pytest.mark.parametrize('operation', [
Copy link
Member

Choose a reason for hiding this comment

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

That's what I love about new linter rules! It allows to find errors even here!

first, *iterable = other_iterable

# Wrong:
[*iterable]
Copy link
Member

Choose a reason for hiding this comment

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

I guess we should also show how to handle this situation. Let's add list(iterable) to the correct examples.

@sobolevn
Copy link
Member

By the way, @skarzi can you please update the CHANGELOG.md with all changes that we have already merged into 0.14?

I forgot about it.

@sobolevn sobolevn merged commit 06e9426 into wemake-services:master Jan 26, 2020
@sobolevn
Copy link
Member

Thanks a lot!

@skarzi skarzi deleted the issue-1101 branch January 26, 2020 15:09
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.

Forbid collection creation with unpacking without more arguments
3 participants