django-jenkins icon indicating copy to clipboard operation
django-jenkins copied to clipboard

Crash when running pylint with pylint version >= 2.0

Open Jean-Daniel opened this issue 6 years ago • 5 comments

recent pylint version don't support the exit keyword (and uses do_exit instead)

File "/opt/jenkins/workspace/webservices/env/lib/python3.6/site-packages/django_jenkins/management/commands/jenkins.py", line 116, in handle
    coverage.save(tested_locations, options)
  File "/opt/jenkins/workspace/webservices/env/lib/python3.6/site-packages/django_jenkins/tasks/run_pylint.py", line 44, in run
    lint.Run(args, reporter=ParseableTextReporter(output=output), exit=False)
TypeError: __init__() got an unexpected keyword argument 'exit'

Jean-Daniel avatar Jul 18 '18 14:07 Jean-Daniel

@kmmbvnr can you please take a look?

camilonova avatar Sep 29 '18 14:09 camilonova

In the mean time I'm using following monkey patch:

from django_jenkins.tasks import run_pylint


class Lint:
    class Run(run_pylint.lint.Run):
        def __init__(self, *args, **kwargs):
            super().__init__(*args, do_exit=kwargs.pop("exit"), **kwargs)


run_pylint.lint = Lint

rooterkyberian avatar Apr 21 '19 00:04 rooterkyberian

@kmmbvnr is there anything we can do to progress this PR? :smiley:

sergei-maertens avatar Aug 02 '19 11:08 sergei-maertens

The same problem for django-jenkins 0.110.0 and pylint 2.4.4

HayHiTee avatar Jan 02 '20 11:01 HayHiTee

Pylint < 2.0 is also not avaible for Python 3.7, so this is really becoming a problem :(

sergei-maertens avatar Jan 13 '20 11:01 sergei-maertens