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
handle FileSkipComment #230
handle FileSkipComment #230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great patch! A couple of minor fixes still needed.
@akaihola Hey :). I don't understand why the tests are failing. Can you help me? I think isort is failing because it's detecting the comment in the test
isort is handeling every line with # isort: skip_file regardless if this is a string and no comment. https://github.com/PyCQA/isort/blob/80c213b2d5d95350ce5dc0d7bbc4dc0065435bd9/isort/core.py#L153 And for the rest maybe you have an idea? |
@chrisdecker1201, there are two test failures. The first one is AttributeError: '_io.StringIO' object has no attribute 'buffer' and is caused by a change in Flake 4.0.0. I'm downgrading to Flake 3.x in #233 – could you review that one? After it's merged, you could rebase on The other failure is just due to Black reformatting. Add a second empty line before |
Thank you for your help. I think when the fix in isort is integrated than everything could be right now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A change log entry is still needed, otherwise I think this is ready to be merged if we get the tests to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix test suite compatibility with current and older isort
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good!
Next, I'll rebase this on master
and merge for inclusion in the 1.4.0 release.
Co-authored-by: Antti Kaihola <13725+akaihola@users.noreply.github.com>
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.88%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
At the moment I've to face this issue because I added a skip_file comment to one of my files.
This may fix it.