Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very strange behaviour with pylint and pylintrc file. #227

Closed
1oglop1 opened this issue Jul 29, 2017 · 5 comments
Closed

Very strange behaviour with pylint and pylintrc file. #227

1oglop1 opened this issue Jul 29, 2017 · 5 comments

Comments

@1oglop1
Copy link

1oglop1 commented Jul 29, 2017

My current configuration:
.prospector.yaml

pep257:
  disable:
    - D203
    - D212
  enable:
    - D213

pep8:
  enable:
    - W601
  options:
    max-line-length: 121

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

ignore-paths:
  - _CI
  - build

What is happening:
I had .pylintrc in the project just because of line-too-long.
And this command prospector -DFM -s veryhigh gave me 2 pylint warnings about #ToDo and #Fixme, which was desired.

I have moved line-too-long to .prospector.yaml (as above)
And removed .pylintrc.
Then I did not get warnings from pylint.

After putting empty .pylintrc back. It worked again

@Dunedan
Copy link
Contributor

Dunedan commented Oct 23, 2018

I can confirm a different behavior whether an empty .pylintrc is available or not. In my specific case I have 0 warnings without an empty .pylintrc, but 849 with it.

@ltalirz
Copy link

ltalirz commented Nov 15, 2018

prospector has a number of default settings for pylint (to see which, do prospector --show-profile myfile.py).
When you provide a .pylintrc file, (I believe) the prospector defaults are ignored.

@Kilo59
Copy link
Contributor

Kilo59 commented Nov 20, 2018

@ltalirz but custom prospector profile pylint options shouldn't be ignored when there is a .pylintrc file correct?

@carlio
Copy link
Member

carlio commented Nov 20, 2018

In the case of line-too-long from pep8 and pylint, that should go into the blender which is for squashing two similar warnings from two tools into one message. In fact that is here

The flow is 'pylint <- configured by .pylintrc if present <- configured by prospector profiles' so profiles take precedent, and by default there will always be at least some strictness profile... At least I think, been a while so I will go back and check the code.

carlio added a commit that referenced this issue Feb 28, 2022
… rather than replace prospector profile configuration
@carlio
Copy link
Member

carlio commented Feb 28, 2022

This should be fixed now as of pylint 1.7.4

@carlio carlio closed this as completed Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants