prospector icon indicating copy to clipboard operation
prospector copied to clipboard

pylint ignores max-line-length

Open zloy531 opened this issue 9 years ago • 4 comments

Checking the project with prospector and get the warning:

snippets/models.py
  Line: 15
    pylint: line-too-long / Line too long (91/79)
  Line: 16
    pylint: line-too-long / Line too long (86/79)

My .prospector.yaml:

strictness: veryhigh
pylint:
  full: true
pep8:
  full: true
  options:
    max-line-length: 120
uses:
  - django

Why pylint ignores max-line-length? Django, python3.6, prospector==0.12.7 (and I checked master branch too), pylint==1.7.2.

zloy531 avatar Jul 22 '17 18:07 zloy531

My understanding is that prospector runs both pylint and pep8 independently. You are telling pep8 that the max-line-length should be 120, but that option isn't shared with pylint. I've personally dealt with this by disabling pylint from checking line-too-long, since pep8 already checks it.

pylint:
  disable:
    - line-too-long  # Already checked by pep8

A nice feature of prospector would be to be able to specify options like max-line-length across tools.

harrisont avatar Jul 25 '17 17:07 harrisont

I've made the same, as workaround, but I also have another project with python3.4, prospector==0.12.4 and pylint 1.6.5 - everything is ok without suppression of the error. So it's regression, I think. But, unfortunately, I can't use old prospector version - because of python3.6.

zloy531 avatar Jul 25 '17 17:07 zloy531

You should simply pass the max-line-length: 120 options to pylint and problem solved.

victornoel avatar Sep 21 '18 11:09 victornoel

It is possible to specify --max-line-length at the command line or in a profile, and it will be applied to tools; this has been a feature for a while so I'm closing this old issue report as I think it was forgotten to close it when the feature got added :-)

carlio avatar Feb 27 '22 09:02 carlio