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

Issue #1172 #1199

Merged
merged 25 commits into from
Mar 6, 2020
Merged

Issue #1172 #1199

merged 25 commits into from
Mar 6, 2020

Conversation

adambenali
Copy link
Contributor

@adambenali adambenali commented Feb 28, 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

We first wanted to use the existing FileMagicCommentsVisitor, because it would make more sense as a shebang is also a magic comment. This wouldn't work however since we also need to check cases where there is no comment in the file. So we created a new visitor for this.
The behavior is exactly the same as flake8-executable.

🙏 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.

hanzhsun and others added 16 commits February 26, 2020 17:44
Add ExecutableMismatchViolation and remove flake8-executable
Fix checking logic so that we don't thoroughly check every comment
* Add ExecutableMismatchViolation #9

* Add WPS452 to test_noqa.py #5

* Remove dependency and related test

* Add test resource files from flake8-executable

* Add tests for check_valid_shebang #7

* Implement the full checking logic (#13)

* Fix linting problem (#14)

* Clean up code (#15)

Fix checking logic so that we don't thoroughly check every comment

* Fix permissions (#16)

* Ignore failing test files

* Update test file to be compatible with the new visitor

* Fix linter issues

* Make a new visitor to handle files with 0 comments (#17)

* Exclude test files from linting

Co-authored-by: Hanzhang <[email protected]>
Co-authored-by: jrutqvist <[email protected]>
Co-authored-by: Gabriel Chang <[email protected]>
@coveralls
Copy link

coveralls commented Feb 28, 2020

Pull Request Test Coverage Report for Build 2758

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

Totals Coverage Status
Change from base Build 2751: 0.0%
Covered Lines: 5247
Relevant Lines: 5247

💛 - 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! Looking good! 🥳

We need to fix some testing related things and minor code issues and we are good to go!

@adambenali adambenali requested a review from sobolevn February 29, 2020 14:46
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.

Great job! Thank you!

There are a lot of comments fixed. And we are moving towards an awesome new rule.
Keep up the good work! 👍

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.

Awesome. This was the last round of review.

Just two cosmetic changes and we are ready to go!
Thank you very much for working on this! This is an important feature.

@adambenali adambenali requested a review from sobolevn March 1, 2020 12:14
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 a lot! Awesome job, I am going to merge this into 0.15 🎉

@sobolevn sobolevn modified the milestones: Version 0.15, Version 0.14 aka python3.8 Mar 2, 2020
@sobolevn
Copy link
Member

sobolevn commented Mar 5, 2020

Oh, I am merging this into 0.14. My mistake!

@adambenali can you please rebase this PR or allow changes from maintainers?

@sobolevn sobolevn removed the on hold label Mar 5, 2020
@adambenali
Copy link
Contributor Author

Oh, I am merging this into 0.14. My mistake!

@adambenali can you please rebase this PR or allow changes from maintainers?

@sobolevn, edits from maintainers are already allowed.

@sobolevn
Copy link
Member

sobolevn commented Mar 5, 2020

Strange. I still cannot fix conflicts.
Снимок экрана 2020-03-05 в 23 01 01

@adambenali
Copy link
Contributor Author

adambenali commented Mar 5, 2020

Oh sorry, It should work now, I've removed the protection from the branch !

@sobolevn sobolevn merged commit cf3aef9 into wemake-services:master Mar 6, 2020
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.

Remove flake8-executable dependency
5 participants