coala-bears
coala-bears copied to clipboard
PyLintBear: Support pylint >= 2.0
Make coala-bears support the latest version of the pylint dependency.
Closes https://github.com/coala/coala-bears/issues/2826
For short term contributors: we understand that getting your commits well defined like we require is a hard task and takes some learning. If you look to help without wanting to contribute long term there's no need for you to learn this. Just drop us a message and we'll take care of brushing up your stuff for merge!
Checklist
- [ ] I read the commit guidelines and I've followed them.
- [ ] I ran coala over my code locally. (All commits have to pass individually. It is not sufficient to have "fixup commits" on your PR, our bot will still report the issues for the previous commit.) You will likely receive a lot of bot comments and build failures if coala does not pass on every single commit!
After you submit your pull request, DO NOT click the 'Update Branch' button. When asked for a rebase, consult coala.io/rebase instead.
Please consider helping us by reviewing other peoples pull requests as well:
- pick up any PR at https://coala.io/review
- review it (check https://coala.io/reviewing for more info)
- if you are sure that it needs work, use
corobo mark wip <URL>
to get it out of the review queue.
The more you review, the more your score will grow at coala.io and we will review your PRs faster!
Yes that's a big issue for me too. I been trying to replicate the tests on my machine but I am running into one issue after another. Everyone has suggested methods to their best but none work. All the requirements and test-requirements too installed properly but getting ModuleNotFound error for every other dependency.
Which of the tests give you the error @Akhelesh ? Also, as mentioned in this step of the Newcomers' Guide, it would be a nice practice to not make changes on the Master Branch of your forked repository in the future.
Which of the tests give you the error @Akhelesh ? Also, as mentioned in this step of the Newcomers' Guide, it would be a nice practice to not make changes on the Master Branch of your forked repository in the future.
@shashank-b I don't think that would affect the build but thanks I will surely keep that in mind while working on future bugs. The PyLintBearTest is what's causing the build to fail.
@Akhelesh, that'd definitely not affect the build :smile:, it was just a suggestion. Okay.
@Akhelesh Appvevor gives the error message
Python34\lib\site-packages\coalib\testing\LocalBearTestHelper.py:228: in check_invalidity
self.assertNotEqual(len(bear_output), 0, msg=msg)
E AssertionError: 0 == 0 : The local bear 'PyLintBear' yields no result although it should.
The above error means that the problem is in the test case. Are you sure that you updating the Pylint
version don't have to update the test cases? I mean can you verify that the functionality of the Pylint is still the same as it was in version 1.7.2
The Test for this bear is written here. It fails at line 31. The test file that this test use is here.
The appveryor fails because the test written at line 27
self.section.append(Setting('pylint_disable', ''))
self.check_invalidity(
self.uut,
[], # Doesn't matter, pylint will parse the file
self.test_file)
when run, should produce some output/error message. FYI the above test case adds line something like disable=
in the configuration filie, which basically means to disable no errors. But it seems like(from the appveyor error) that, pylint isn't producing any error message.
IMHO I guess you should go through Pylint documentation and see what's causing this.
Comment on 425c1e48d2adad44ccbbf056c19ad8fa3ceaba13, file bears/python/PyLintBear.py, line 1.
This file contains unused source code.
Origin: PyUnusedCodeBear, Section: all.flakes
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmp6cxkcjmk/bears/python/PyLintBear.py
+++ b/tmp/tmp6cxkcjmk/bears/python/PyLintBear.py
@@ -1,4 +1,3 @@
-import os
import shlex
from coalib.bearlib.abstractions.Linter import linter
Comment on bbc80243ba3d914474661389f8b07e27eb7e284c, file bears/python/PyLintBear.py, line 1.
This file contains unused source code.
Origin: PyUnusedCodeBear, Section: all.flakes
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmpcx2o_12t/bears/python/PyLintBear.py
+++ b/tmp/tmpcx2o_12t/bears/python/PyLintBear.py
@@ -1,4 +1,3 @@
-import os
import shlex
from coalib.bearlib.abstractions.Linter import linter
Travis build is failing due to this issue https://github.com/coala/coala-bears/issues/2843 so the build can't complete successfully until the issue is resolved.
@gitmate-bot rebase
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently :warning:
Automated rebase with GitMate.io was successful! :tada:
@gitmate-bot rebase
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently :warning:
Automated rebase with GitMate.io was successful! :tada:
@Akhelesh would you please add a note on https://github.com/coala/coala-bears/issues/2826 explaining what happens when an empty file is used for the rcfile . That will complement your commit message.
The travis here is failing due to a internal version conflict.
pkg_resources.ContextualVersionConflict: (six 1.10.0 (/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages), Requirement.parse('six>=1.11.0'), {'jsonschema'})
Can you have a look at it.
@Akhelesh , the build system has been heavily revised. You will need to re-run .ci/generate_bear_metadata.py which now also generates bear-metadata.yaml
any way to make progress on this? The change does not look that huge.