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
Adds isort output to each warning #61
Conversation
@gforcada tests show different behavior locally and inside CI. |
@sobolevn hi! 👋 Thanks for this pull request! I'm a bit hesitant to merge this right away... as far as I've seen all flake8 errors are a single line long without extra lines, and this clearly breaks it, and given that, at least I'm not aware of it, no other flake8 plugins provide error messages that spans more than a line. Would you mind if we gate this new output by a configuration parameter ( If other flake8 plugins do provide multiline output, then I would be totally fine with it. |
@sobolevn regarding the difference between locally and in CI: you probably have some generic configuration files on your home folder, right? I could reproduce the same errors as you mentioned, but forcing (with pdb) the settings file to not be found, on that specific test that fails locally, it made the test pass. |
@gforcada hm, never thought about I have also checked the Considering making it optional: yes, that's a good thing. I can implement this option. But, the question is: should be turned on or off by default? |
@sobolevn nice plugin, I will add it to my list of flake8 plugins! 💯 As for the configuration option... I would say to keep it off by default and maybe raise a question on flake8 itself for directives regarding the output format? If there is consensus on multiline output we can then change it to on by default. Does that sound acceptable for you? 🤔 Thanks for your patience! 🙇♂️ |
@gforcada sure, let's make it off by default. I will update my PR soon. |
@gforcada sorry that it took me so long. I have been busy working on this project: https://github.com/wemake-services/wemake-python-styleguide Which uses Now, this is my top level priority. 🙂 |
Just for the reference. We still have this flaky test:
It fails locally and passes in travis. |
@sobolevn I guess that this one fails locally because you probably have some configuration file in your home or up in the folder hierarchy where this test is. If travis is always happy about it, then I would not refactor it. |
@sobolevn flake8-isort 2.6.0 is out 🚀 🎆 |
This PR introduces new warning output style.
It now includes
isort
diff with how to fix your warning.Works the same way as
pytest-isort
.Problem (multiple spaces):
Old warning:
New warning:
Closes #60