coala-bears icon indicating copy to clipboard operation
coala-bears copied to clipboard

PyLintBear: Support pylint >= 2.0

Open Akhelesh opened this issue 6 years ago • 18 comments

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:

The more you review, the more your score will grow at coala.io and we will review your PRs faster!

Akhelesh avatar Dec 14 '18 14:12 Akhelesh

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.

Akhelesh avatar Dec 23 '18 07:12 Akhelesh

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 avatar Dec 23 '18 07:12 shashank-b

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 avatar Dec 23 '18 14:12 Akhelesh

@Akhelesh, that'd definitely not affect the build :smile:, it was just a suggestion. Okay.

shashank-b avatar Dec 23 '18 17:12 shashank-b

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

Naveenaidu avatar Dec 24 '18 10:12 Naveenaidu

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

gitmate-bot avatar Jan 20 '19 18:01 gitmate-bot

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

gitmate-bot avatar Jan 23 '19 20:01 gitmate-bot

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.

Akhelesh avatar Jan 28 '19 15:01 Akhelesh

@gitmate-bot rebase

jayvdb avatar Feb 04 '19 06:02 jayvdb

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:

gitmate-bot avatar Feb 04 '19 06:02 gitmate-bot

Automated rebase with GitMate.io was successful! :tada:

gitmate-bot avatar Feb 04 '19 06:02 gitmate-bot

@gitmate-bot rebase

jayvdb avatar Feb 05 '19 03:02 jayvdb

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:

gitmate-bot avatar Feb 05 '19 03:02 gitmate-bot

Automated rebase with GitMate.io was successful! :tada:

gitmate-bot avatar Feb 05 '19 03:02 gitmate-bot

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

jayvdb avatar Feb 05 '19 03:02 jayvdb

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.

sladyn98 avatar Mar 03 '19 08:03 sladyn98

@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

jayvdb avatar Jul 22 '19 00:07 jayvdb

any way to make progress on this? The change does not look that huge.

tkruse avatar Dec 15 '19 06:12 tkruse