4

I have an ever-growing list of modules to ignore in my pylintrc:

ignored-modules=anytree,apsw,bs4,cachecontrol,dateutil,inflect,matplotlib,markdown,munch,MySQLdb,pytest,pytz,requests_oauthlib,rrule,seaborn,titlecase,untangle,googleapiclient

because otherwise codacy will fail my pull request.

Is there a way to have codacy know about these (pip) modules?

Failing that is there a way to say "ignore these on codacy checks but don't ignore them during local runs of pylint"?

Thomas David Baker
  • 1,037
  • 10
  • 24

1 Answers1

4

The fact that there is a .codacy-pylintrc file suggests it is possible to configure codacy-pylint to use a dedicate pylintrc file (with the -rcfile=.codacy-pylintrc option)

As opposed to a local run of pylint, which will look by default for a regular ~/.pylintrc file (where you don't have to ignore those modules).

As commented, that also means you can do the reverse:

  • make sure your local run of pylint uses a custom file (with the -rcfile=xxx option),
  • while codacy-pylint would use the default .pylintrc file
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Awesome, this is a start. I don't think it's going to read a .codacy-pylintrc that I just dump in my project because that file is from their Docker instance they use to run pylint (?) but I've jammed one in for a test and sent a PR … – Thomas David Baker Dec 22 '17 at 10:34
  • 1
    @ThomasDavidBaker Or do the reverse: make sure your local run of pylint use a custom file (with the `-rcfile=xxx` option), while codacy-pylint would use the default file. – VonC Dec 22 '17 at 10:36
  • Man, I feel slow :) I'll do that. Thanks! – Thomas David Baker Dec 22 '17 at 11:37